diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt index 022ff370d22..da13decc396 100644 --- a/Zend/tests/dereference_002.phpt +++ b/Zend/tests/dereference_002.phpt @@ -76,4 +76,4 @@ NULL Notice: Undefined offset: 3 in %s on line %d -Fatal error: Call to a member function bar() on a non-object in %s on line %d +Fatal error: Call to a member function bar() on null in %s on line %d diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 1c6d3f453ca..90cb0cad6a8 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2463,7 +2463,7 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, TMP|VAR|UNUSED|CV, CONST|TMP|VAR|CV) FREE_OP2(); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 48f3245ee6a..ade0cb82c5e 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -9313,7 +9313,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCO HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -10178,7 +10178,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE zval_dtor(free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -11044,7 +11044,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE zval_ptr_dtor_nogc(&free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -12490,7 +12490,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_ HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -15728,7 +15728,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCO HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -18074,7 +18074,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE zval_dtor(free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -20381,7 +20381,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE zval_ptr_dtor_nogc(&free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -23838,7 +23838,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_ HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -25480,7 +25480,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_O HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -26888,7 +26888,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMP_HANDLER(ZEND_OPC zval_dtor(free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -28202,7 +28202,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_VAR_HANDLER(ZEND_OPC zval_ptr_dtor_nogc(&free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -29944,7 +29944,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCO HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -33183,7 +33183,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCOD HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -35295,7 +35295,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_ zval_dtor(free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -37462,7 +37462,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_ zval_ptr_dtor_nogc(&free_op2.var); HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { @@ -40630,7 +40630,7 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_H HANDLE_EXCEPTION(); } - zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval); + zend_error_noreturn(E_ERROR, "Call to a member function %s() on %s", function_name_strval, zend_get_type_by_const(Z_TYPE_P(call->object))); } if ((call->fbc->common.fn_flags & ZEND_ACC_STATIC) != 0) { diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index 168ecb03810..7e994bc4d0b 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -26,4 +26,4 @@ $DB->query_single('SELECT DATE()'); ?> --EXPECTF-- -Fatal error: Call to a member function fetch_row() on a non-object in %sbug33491.php on line %d +Fatal error: Call to a member function fetch_row() on boolean in %sbug33491.php on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 42c3d074ad3..224684b8782 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -93,4 +93,4 @@ array(1) { Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d -Fatal error: Call to a member function execute() on a non-object in %s on line %d \ No newline at end of file +Fatal error: Call to a member function execute() on boolean in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index 90cedef5617..b7b0ab6294c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -36,4 +36,4 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d -Fatal error: Call to a member function execute() on a non-object in %s on line %d \ No newline at end of file +Fatal error: Call to a member function execute() on boolean in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index 4d59e8c3b10..c16ce5dd1cb 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -56,4 +56,4 @@ Testing native PS... Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d -Fatal error: Call to a member function execute() on a non-object in %s on line %d \ No newline at end of file +Fatal error: Call to a member function execute() on boolean in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index 91b5237ea8d..56c37c5f1a9 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -99,4 +99,4 @@ Native Prepared Statements... Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d -Fatal error: Call to a member function errorInfo() on a non-object in %s on line %d +Fatal error: Call to a member function errorInfo() on boolean in %s on line %d