@@ -689,12 +689,12 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
689
689
690
690
if (zend_fcall_info_init (callable , 0 , fci , fcc , NULL , & is_callable_error ) == FAILURE ) {
691
691
if (is_callable_error ) {
692
- pdo_raise_impl_error ( stmt -> dbh , stmt , "HY000 " , is_callable_error );
692
+ zend_type_error ( "%s " , is_callable_error );
693
693
efree (is_callable_error );
694
694
} else {
695
- pdo_raise_impl_error ( stmt -> dbh , stmt , "HY000" , "user-supplied function must be a valid callback" );
695
+ zend_type_error ( "user-supplied function must be a valid callback" );
696
696
}
697
- return 0 ;
697
+ return false ;
698
698
}
699
699
if (is_callable_error ) {
700
700
/* Possible error message */
@@ -704,20 +704,20 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info *
704
704
fci -> param_count = num_args ; /* probably less */
705
705
fci -> params = safe_emalloc (sizeof (zval ), num_args , 0 );
706
706
707
- return 1 ;
707
+ return true ;
708
708
}
709
709
/* }}} */
710
710
711
- static int do_fetch_func_prepare (pdo_stmt_t * stmt ) /* {{{ */
711
+ static bool do_fetch_func_prepare (pdo_stmt_t * stmt ) /* {{{ */
712
712
{
713
713
zend_fcall_info * fci = & stmt -> fetch .cls .fci ;
714
714
zend_fcall_info_cache * fcc = & stmt -> fetch .cls .fcc ;
715
715
716
716
if (!make_callable_ex (stmt , & stmt -> fetch .func .function , fci , fcc , stmt -> column_count )) {
717
- return 0 ;
717
+ return false ;
718
718
} else {
719
719
stmt -> fetch .func .values = safe_emalloc (sizeof (zval ), stmt -> column_count , 0 );
720
- return 1 ;
720
+ return true ;
721
721
}
722
722
}
723
723
/* }}} */
@@ -1338,8 +1338,8 @@ PHP_METHOD(PDOStatement, fetchAll)
1338
1338
}
1339
1339
/* TODO Check it is a callable? */
1340
1340
ZVAL_COPY_VALUE (& stmt -> fetch .func .function , arg2 );
1341
- if (do_fetch_func_prepare (stmt ) == 0 ) {
1342
- error = 1 ;
1341
+ if (do_fetch_func_prepare (stmt ) == false ) {
1342
+ RETURN_THROWS () ;
1343
1343
}
1344
1344
break ;
1345
1345
0 commit comments