Merge branch 'PHP-5.6'

* PHP-5.6:
  Bug 64744 Show the type of the non-object for more descriptive errors
This commit is contained in:
Stanislav Malyshev 2014-06-08 19:18:09 -07:00
commit 9fceb05fcf
8 changed files with 23 additions and 23 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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) {

View File

@ -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

View File

@ -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
Fatal error: Call to a member function execute() on boolean in %s on line %d

View File

@ -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
Fatal error: Call to a member function execute() on boolean in %s on line %d

View File

@ -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
Fatal error: Call to a member function execute() on boolean in %s on line %d

View File

@ -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