@@ -1179,7 +1179,7 @@ PHP_METHOD(PDOStatement, fetchAll)
11791179 zend_class_entry * fetch_class = NULL ;
11801180 if (arg2 ) {
11811181 if (Z_TYPE_P (arg2 ) != IS_STRING ) {
1182- zend_argument_type_error (2 , "must be of type string, %s given" , zend_zval_value_name ( arg2 ) );
1182+ zend_wrong_parameter_type_error (2 , Z_EXPECTED_STRING , arg2 );
11831183 RETURN_THROWS ();
11841184 }
11851185 fetch_class = zend_lookup_class (Z_STR_P (arg2 ));
@@ -1228,7 +1228,7 @@ PHP_METHOD(PDOStatement, fetchAll)
12281228 if (arg2 ) {
12291229 // Reuse convert_to_long(arg2); ?
12301230 if (Z_TYPE_P (arg2 ) != IS_LONG ) {
1231- zend_argument_type_error (2 , "must be of type int, %s given" , zend_zval_value_name ( arg2 ) );
1231+ zend_wrong_parameter_type_error (2 , Z_EXPECTED_LONG , arg2 );
12321232 RETURN_THROWS ();
12331233 }
12341234 if (Z_LVAL_P (arg2 ) < 0 ) {
@@ -1698,7 +1698,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
16981698 return false;
16991699 }
17001700 if (Z_TYPE (args [0 ]) != IS_STRING ) {
1701- zend_argument_type_error (arg1_arg_num , "must be of type string, %s given" , zend_zval_value_name ( & args [0 ]) );
1701+ zend_wrong_parameter_type_error (arg1_arg_num , Z_EXPECTED_STRING , & args [0 ]);
17021702 return false;
17031703 }
17041704 cep = zend_lookup_class (Z_STR (args [0 ]));
@@ -1710,8 +1710,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
17101710 /* TODO: Improve logic? */
17111711 if (variadic_num_args == 2 ) {
17121712 if (Z_TYPE (args [1 ]) != IS_NULL && Z_TYPE (args [1 ]) != IS_ARRAY ) {
1713- zend_argument_type_error (constructor_arg_num , "must be of type ?array, %s given" ,
1714- zend_zval_value_name (& args [1 ]));
1713+ zend_wrong_parameter_type_error (constructor_arg_num , Z_EXPECTED_ARRAY_OR_NULL , & args [1 ]);
17151714 return false;
17161715 }
17171716 if (Z_TYPE (args [1 ]) == IS_ARRAY && zend_hash_num_elements (Z_ARRVAL (args [1 ]))) {
@@ -1736,7 +1735,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
17361735 return false;
17371736 }
17381737 if (Z_TYPE (args [0 ]) != IS_OBJECT ) {
1739- zend_argument_type_error (arg1_arg_num , "must be of type object, %s given" , zend_zval_value_name ( & args [0 ]) );
1738+ zend_wrong_parameter_type_error (arg1_arg_num , Z_EXPECTED_OBJECT , & args [0 ]);
17401739 return false;
17411740 }
17421741
0 commit comments