Código PHP:
Fatal error: Call to a member function on a non-object in C:xampphtdocszsamermoduloscatalogoincludesautoload_func.php on line 106
aqui esta el código
Código PHP:
case 'classInstantiate':
$objectName = $entry['objectName'];
$className = $entry['className'];
if (isset($entry['classSession']) && $entry['classSession'] === true) {
if (isset($entry['checkInstantiated']) && $entry['checkInstantiated'] === true) {
if (!isset($_SESSION[$objectName])) {
$_SESSION[$objectName] = new $className();
$debugOutput .= 'if (!$_SESSION[' . $objectName . ']) { ';
$debugOutput .= '$_SESSION[' . $objectName . '] = new ' . $className . '();';
$debugOutput .= ' }<br />';
}
} else {
$_SESSION[$objectName] = new $className();
$debugOutput .= ' $_SESSION[' . $objectName . '] = new ' . $className . '();</br>';
}
} else {
$$objectName = new $className();
$debugOutput .= '$' . $objectName . ' = new ' . $className . '();</br>';
}
break;
case 'objectMethod':
$objectName = $entry['objectName'];
$methodName = $entry['methodName'];
if (is_object($_SESSION[$objectName])) {
$_SESSION[$objectName]->$methodName();
$debugOutput .= '$_SESSION[' . $objectName . ']->' . $methodName . '();</br>';
} else {
$objectName=$_SESSION[$objectName];
$$objectName->$methodName();
$debugOutput .= '$' . $objectName . '->' . $methodName . '();</br>'; // ESTA ES LA LINEA 106
}
break;
Código PHP:
if (is_object($_SESSION[$objectName])) {
$_SESSION[$objectName]->$methodName();
$debugOutput .= '$_SESSION[' . $objectName . ']->' . $methodName . '();</br>';
} else {
$objectName=$_SESSION[$objectName];
$$objectName->$methodName();
$debugOutput .= '$' . $objectName . '->' . $methodName . '();</br>'; //ESTA ES LA LINEA 106
}
gracias