Fatal error with Custom Magento Module on one server but not the other

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2011-01-16T15:25:13Z Indexed on 2011/01/16 19:53 UTC
Read the original article Hit count: 232

Hi,

I am creating my own custom module in Magento and during testing on a Litespeed server (PHP v5.2.14) I am getting a Fatal Error: Call to a member function batch() on a non-object in ../../../BatchController.php on line 25 that was not appearing during testing on another linux server and a wamp server (PHP v5.2.11).

This one has stumped me. I am guessing it has something to do with the server configuration rather than the code itself. But i am just guessing. I was hoping someone here could tell me.

The only real major difference I could see, aside from the php versions and environment, is that the server that the error is on is using the Suhosin Patch. But would that be something that could cause this?

The line in question is Mage::getModel('mymodule/mymodel')->batch(); which is enclosed in an IF statement. batch() is a public function located in my model file.

If you need more code let me know.

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about magento