Sorry for the delay.
May I ask how is the $portalesActivos
created? It's probably incorrectly inferring its type.
For breaking this down, it may help to put the following into the code, so we will see what the editor "thinks":
/**
* @trace $portalesActivos
* @trace $portal
*/
It will look like this:
Thank you