Fatal Error Call to a member function on a non-obj

I am trying to help someone resolve an issue they are having with a module where the developer must be in hospital dying because they won't answer their emails; otherwise that would mean they are being an arse.

I am getting a fatal error message:

Fatal error: Call to a member function getMembershipById() on a non-object on line 42.

Line 42 is:

$aMembInfo = $this->oMain->_oDb->getMembershipById($iMembId);

I have looked at the error code but the explanations were not that great; if the coders here would give me an explanation and point me in some direction to examine why this is occurring perhaps I can help the person that I am trying to help.

Geeks, making the world a better place
Quote · 18 May 2013

i had the same with a developer / vendor!
no answer what so ever... it makes me sick!!  

anyways: holds $iMembId a value?  if it's empty the function could return the fatal error

Quote · 18 May 2013

I think I will see what is being passed to the function.

Geeks, making the world a better place
Quote · 18 May 2013

I had it to output the variable; iMembId = 4 was the result.

Geeks, making the world a better place
Quote · 19 May 2013

Please take a minute and explain to me the non-object and what can trigger this error message.  I have already searched on google without a clear understanding.  I need to figure this out so the person I am trying to help can get this module working.

Geeks, making the world a better place
Quote · 19 May 2013

Not even i can really explain it.

But most likely a problem with one of the objects to the left. In other words oMain and _oDb are both objects, so if one of them is not getting properly defined it will not be a object and thus cause a error.

Either oMain or _oDb objects are not proper.

From one of the main module classes of Module, Template, Cron, and Config the _oDb is already setup by the default module class.

Personally, even as a developer, i try to never touch another developers mods. I always recommend if the module does not work, and the developer is not taking care of it, you file a chargeback and get your money back. You should not have to debug someone elses work.



oMain is only referenced when a developer adds a custom class that is not one of the 5 default module classes.

Anyhow. There is no way i can debug it for you. Could be caused by anything. Even a problem in the class this one is extending or the the class is extending the wrong class.

Did the module ever work?





https://www.deanbassett.com
Quote · 19 May 2013

 

Did the module ever work?

Parts of it works; I really don't feel I should divulge too much info here.  I have already advise the purchaser they may have to go ahead and file a charge-back because the advertisement in the market clearly states a feature that is not working and was commented out; most likely because it was not working for the developer but they wanted to put it on the market.  If so, then they should have not included the feature in the list of features; that feature is why the module was purchased in the first place.

Geeks, making the world a better place
Quote · 19 May 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.