My brain hurts. I’ve been battling this for over a day now and am no closer to a solution. I know it’s not policy to review/debug third-party scripts, but I could use some illumination as it appears to be EE’s handling of the include in question that is problematic.
The code I’m using is the Vogoo LIB, available here. It comprises a core include, plus a couple of supplementar ones depending on the required functionality.
The template code is:
<?
error_reporting(E_ALL);
include($_SERVER['DOCUMENT_ROOT']."/vogoo/vogoo.php");
include($_SERVER['DOCUMENT_ROOT']."/vogoo/items.php");
$vogoo_check = $vogoo->connected;
if($vogoo_check)
{
echo "heya";
$ret = $vogoo_items->member_get_recommended_items(1);
print_r($ret);
} else {
generate_error(0,"Vogoo DB not connecting");
}
?>
Which produces the following errors:
Notice: Trying to get property of non-object in /home/dir/public_html/vogoo/items.php on line 90
Fatal error: Call to a member function sql_query() on a non-object in /home/dir/public_html/vogoo/items.php on line 90
I’ve seen some talk on the boards here about variables and scope setting, but frankly am unsure where to start. I’ve confirmed this is working properly just in native PHP docs on the server, so it is something to do with how EE is resolving…. something.
Moved to Modules: Technical Assistance by Moderator
