3535#define PHP_STMT_GET_OBJ \
3636 pdo_stmt_t *stmt = Z_PDO_STMT_P(ZEND_THIS); \
3737 if (!stmt->dbh) { \
38- zend_throw_error(NULL, "%s object is uninitialized", ZSTR_VAL( Z_OBJ(EX(This))->ce->name) ); \
38+ zend_throw_error(NULL, "%pS object is uninitialized", Z_OBJ(EX(This))->ce->name); \
3939 RETURN_THROWS(); \
4040 } \
4141
@@ -293,7 +293,7 @@ static bool really_register_bound_param(struct pdo_bound_param_data *param, pdo_
293293 /* if you prepare and then execute passing an array of params keyed by names,
294294 * then this will trigger, and we don't want that */
295295 if (param -> paramno == -1 ) {
296- zend_argument_value_error (1 , "must refer to a column present in the result set, \"%s \" given" , ZSTR_VAL ( param -> name ) );
296+ zend_argument_value_error (1 , "must refer to a column present in the result set, \"%pS \" given" , param -> name );
297297 return false;
298298 }
299299 }
@@ -1208,8 +1208,8 @@ PHP_METHOD(PDOStatement, fetchAll)
12081208 case PDO_FETCH_FUNC : /* Cannot be a default fetch mode */
12091209 if (ZEND_NUM_ARGS () != 2 ) {
12101210 zend_string * func = get_active_function_or_method_name ();
1211- zend_argument_count_error ("%s () expects exactly 2 argument for PDO::FETCH_FUNC, %d given" ,
1212- ZSTR_VAL ( func ) , ZEND_NUM_ARGS ());
1211+ zend_argument_count_error ("%pS () expects exactly 2 argument for PDO::FETCH_FUNC, %d given" ,
1212+ func , ZEND_NUM_ARGS ());
12131213 zend_string_release (func );
12141214 RETURN_THROWS ();
12151215 }
@@ -1221,8 +1221,8 @@ PHP_METHOD(PDOStatement, fetchAll)
12211221 case PDO_FETCH_COLUMN :
12221222 if (ZEND_NUM_ARGS () > 2 ) {
12231223 zend_string * func = get_active_function_or_method_name ();
1224- zend_argument_count_error ("%s () expects at most 2 argument for the fetch mode provided, %d given" ,
1225- ZSTR_VAL ( func ) , ZEND_NUM_ARGS ());
1224+ zend_argument_count_error ("%pS () expects at most 2 argument for the fetch mode provided, %d given" ,
1225+ func , ZEND_NUM_ARGS ());
12261226 zend_string_release (func );
12271227 RETURN_THROWS ();
12281228 }
@@ -1247,8 +1247,8 @@ PHP_METHOD(PDOStatement, fetchAll)
12471247 /* No support for PDO_FETCH_INTO which takes 2 args??? */
12481248 if (ZEND_NUM_ARGS () > 1 ) {
12491249 zend_string * func = get_active_function_or_method_name ();
1250- zend_argument_count_error ("%s () expects exactly 1 argument for the fetch mode provided, %d given" ,
1251- ZSTR_VAL ( func ) , ZEND_NUM_ARGS ());
1250+ zend_argument_count_error ("%pS () expects exactly 1 argument for the fetch mode provided, %d given" ,
1251+ func , ZEND_NUM_ARGS ());
12521252 zend_string_release (func );
12531253 RETURN_THROWS ();
12541254 }
@@ -1665,8 +1665,8 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
16651665 case PDO_FETCH_KEY_PAIR :
16661666 if (variadic_num_args != 0 ) {
16671667 zend_string * func = get_active_function_or_method_name ();
1668- zend_argument_count_error ("%s () expects exactly %d arguments for the fetch mode provided, %d given" ,
1669- ZSTR_VAL ( func ) , mode_arg_num , total_num_args );
1668+ zend_argument_count_error ("%pS () expects exactly %d arguments for the fetch mode provided, %d given" ,
1669+ func , mode_arg_num , total_num_args );
16701670 zend_string_release (func );
16711671 return false;
16721672 }
@@ -1675,8 +1675,8 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
16751675 case PDO_FETCH_COLUMN :
16761676 if (variadic_num_args != 1 ) {
16771677 zend_string * func = get_active_function_or_method_name ();
1678- zend_argument_count_error ("%s () expects exactly %d arguments for the fetch mode provided, %d given" ,
1679- ZSTR_VAL ( func ) , arg1_arg_num , total_num_args );
1678+ zend_argument_count_error ("%pS () expects exactly %d arguments for the fetch mode provided, %d given" ,
1679+ func , arg1_arg_num , total_num_args );
16801680 zend_string_release (func );
16811681 return false;
16821682 }
@@ -1696,25 +1696,25 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
16961696 if ((flags & PDO_FETCH_CLASSTYPE ) == PDO_FETCH_CLASSTYPE ) {
16971697 if (variadic_num_args != 0 ) {
16981698 zend_string * func = get_active_function_or_method_name ();
1699- zend_argument_count_error ("%s () expects exactly %d arguments for the fetch mode provided, %d given" ,
1700- ZSTR_VAL ( func ) , mode_arg_num , total_num_args );
1699+ zend_argument_count_error ("%pS () expects exactly %d arguments for the fetch mode provided, %d given" ,
1700+ func , mode_arg_num , total_num_args );
17011701 zend_string_release (func );
17021702 return false;
17031703 }
17041704 } else {
17051705 zend_class_entry * cep ;
17061706 if (variadic_num_args == 0 ) {
17071707 zend_string * func = get_active_function_or_method_name ();
1708- zend_argument_count_error ("%s () expects at least %d arguments for the fetch mode provided, %d given" ,
1709- ZSTR_VAL ( func ) , arg1_arg_num , total_num_args );
1708+ zend_argument_count_error ("%pS () expects at least %d arguments for the fetch mode provided, %d given" ,
1709+ func , arg1_arg_num , total_num_args );
17101710 zend_string_release (func );
17111711 return false;
17121712 }
17131713 /* constructor_arguments can be null/not passed */
17141714 if (variadic_num_args > 2 ) {
17151715 zend_string * func = get_active_function_or_method_name ();
1716- zend_argument_count_error ("%s () expects at most %d arguments for the fetch mode provided, %d given" ,
1717- ZSTR_VAL ( func ) , constructor_arg_num , total_num_args );
1716+ zend_argument_count_error ("%pS () expects at most %d arguments for the fetch mode provided, %d given" ,
1717+ func , constructor_arg_num , total_num_args );
17181718 zend_string_release (func );
17191719 return false;
17201720 }
@@ -1749,8 +1749,8 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a
17491749 case PDO_FETCH_INTO :
17501750 if (total_num_args != arg1_arg_num ) {
17511751 zend_string * func = get_active_function_or_method_name ();
1752- zend_argument_count_error ("%s () expects exactly %d arguments for the fetch mode provided, %d given" ,
1753- ZSTR_VAL ( func ) , arg1_arg_num , total_num_args );
1752+ zend_argument_count_error ("%pS () expects exactly %d arguments for the fetch mode provided, %d given" ,
1753+ func , arg1_arg_num , total_num_args );
17541754 zend_string_release (func );
17551755 return false;
17561756 }
@@ -2228,7 +2228,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int
22282228
22292229 pdo_stmt_t * stmt = Z_PDO_STMT_P (object );
22302230 if (!stmt -> dbh ) {
2231- zend_throw_error (NULL , "%s object is uninitialized" , ZSTR_VAL ( ce -> name ) );
2231+ zend_throw_error (NULL , "%pS object is uninitialized" , ce -> name );
22322232 return NULL ;
22332233 }
22342234
@@ -2294,7 +2294,7 @@ static zval *row_prop_read(zend_object *object, zend_string *name, int type, voi
22942294 // if (is_numeric) {
22952295 // zend_value_error("Invalid column index");
22962296 // } else {
2297- // zend_throw_error(NULL, "No column named \"%s \" exists", ZSTR_VAL( name) );
2297+ // zend_throw_error(NULL, "No column named \"%pS \" exists", name);
22982298 // }
22992299 //}
23002300 //return &EG(uninitialized_zval);
0 commit comments