}
if (zend_hash_find(EG(function_table), function_name_strval, function_name_strlen+1, (void **) &function)==FAILURE) {
- zend_error(E_ERROR, "Call to undefined function: %s()", function_name_strval);
+ zend_error(E_ERROR, "Call to undefined function %s()", function_name_strval);
}
if (!is_const) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
if (ce != EG(scope)) {
- zend_error(E_ERROR, "Call to private __clone from context '%s'", EG(scope) ? EG(scope)->name : "");
+ zend_error(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (!zend_check_protected(clone->common.scope, EG(scope))) {
- zend_error(E_ERROR, "Call to protected __clone from context '%s'", EG(scope) ? EG(scope)->name : "");
+ zend_error(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
if (object->value.obj.handlers->get_class_entry(object TSRMLS_CC) != EG(scope)) {
- zend_error(E_ERROR, "Call to private constructor from context '%s'", EG(scope) ? EG(scope)->name : "");
+ zend_error(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope) ? EG(scope)->name : "");
}
} else if ((constructor->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
if (!zend_check_protected(constructor->common.scope, EG(scope))) {
- zend_error(E_ERROR, "Call to protected constructor from context '%s'", EG(scope) ? EG(scope)->name : "");
+ zend_error(E_ERROR, "Call to protected %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope) ? EG(scope)->name : "");
}
}
}
zend_nuke_object(object TSRMLS_CC); /* unfortunately we *must* destroy it now anyway */
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
- "Call to private %s::__destruct from context '%s'%s",
+ "Call to private %s::__destruct() from context '%s'%s",
ce->name,
EG(scope) ? EG(scope)->name : "",
EG(in_execution) ? "" : " during shutdown ignored");
zend_nuke_object(object TSRMLS_CC); /* unfortunately we *must* destroy it now anyway */
zend_error(EG(in_execution) ? E_ERROR : E_WARNING,
- "Call to protected %s::__destruct from context '%s'%s",
+ "Call to protected %s::__destruct() from context '%s'%s",
ce->name,
EG(scope) ? EG(scope)->name : "",
EG(in_execution) ? "" : " during shutdown ignored");
int(1)
Done
-Warning: Call to protected test::__destruct from context '' during shutdown ignored in Unknown on line 0
+Warning: Call to protected test::__destruct() from context '' during shutdown ignored in Unknown on line 0
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Call to protected constructor from context '' %sfactory_and_singleton_003.php on line %d
+Fatal error: Call to protected test::__construct() from context '' %sfactory_and_singleton_003.php on line %d
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Call to private constructor from context '' %sfactory_and_singleton_004.php on line %d
+Fatal error: Call to private test::__construct() from context '' %sfactory_and_singleton_004.php on line %d
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Call to protected test::__destruct from context '' in %sfactory_and_singleton_005.php on line %d
+Fatal error: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php on line %d
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Call to private test::__destruct from context '' in %sfactory_and_singleton_006.php on line %d
+Fatal error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php on line %d
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Call to protected __clone from context '' %sfactory_and_singleton_007.php on line %d
+Fatal error: Call to protected test::__clone() from context '' %sfactory_and_singleton_007.php on line %d
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Call to private __clone from context '' %sfactory_and_singleton_008.php on line %d
+Fatal error: Call to private test::__clone() from context '' %sfactory_and_singleton_008.php on line %d