Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorException (E_ERROR) Trying to get property 'portalDataInfo' of non-object #36

Closed
myurtsev opened this issue Jul 3, 2019 · 5 comments

Comments

@myurtsev
Copy link

myurtsev commented Jul 3, 2019

I get the following error when I try to fetch the data in a portal (with the FM18 release):

ErrorException (E_ERROR)
Trying to get property 'portalDataInfo' of non-object

I tried it like this: $record->nameoftheportal
This worked with the FM17 version. The portal and the data exists in $record.

Any idea?

@msyk
Copy link
Owner

msyk commented Jul 3, 2019

@myurtsev, thanks for reporting.

So, why don't you use the getPortalNames() and setPortalName() methods? As far as my code shows, the portalName property is private.

@myurtsev
Copy link
Author

myurtsev commented Jul 3, 2019

Sorry, 'portalName' was a bad example. I mean the data in "portalData", not the private property.

In my case, I tried:

$record->programmas_PROGRAMMA_FOTOS

Schermafbeelding 2019-07-03 om 09 55 19

@msyk
Copy link
Owner

msyk commented Jul 3, 2019

Sorry, I can't get the reason so far. The error message 'Trying to get property 'portalDataInfo' of non-object' means to access the portalDataInfo property, but the all portalDataInfo property access are doing after checking to exist the portalDataInfo property.

If you don't mind, could you show me your code and FMDB?

@myurtsev
Copy link
Author

myurtsev commented Jul 3, 2019

$show = $fmdb->web_shows->query( array(array('slug' => $slug, "showOnWeb"=>1)) );

When I dump $show, it shows all the data including the portal data. Then when I try to get the portal data:

$show->programmas_PROGRAMMA_FOTOS

It throws the error mentioned above.

@msyk
Copy link
Owner

msyk commented Jul 15, 2019

@myurtsev Sorry for late. Could you check to contain the 'portalDataInfo' property in the 'data' property of $show variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants