@@ -3879,16 +3879,18 @@ static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
3879
3879
switch (entry_type ) {
3880
3880
case PHP_PG_ASYNC_IS_BUSY :
3881
3881
PQconsumeInput (pgsql );
3882
- RETVAL_LONG (PQisBusy (pgsql ));
3882
+ RETVAL_BOOL (PQisBusy (pgsql ));
3883
3883
break ;
3884
3884
case PHP_PG_ASYNC_REQUEST_CANCEL : {
3885
3885
PGcancel * c ;
3886
3886
char err [256 ];
3887
3887
int rc ;
3888
3888
3889
3889
c = PQgetCancel (pgsql );
3890
- RETVAL_LONG ((rc = PQcancel (c , err , sizeof (err ))));
3890
+ rc = PQcancel (c , err , sizeof (err );
3891
+ RETVAL_BOOL (rc );
3891
3892
if (rc < 0 ) {
3893
+ RETVAL_FALSE ;
3892
3894
zend_error (E_WARNING , "cannot cancel the query: %s" , err );
3893
3895
}
3894
3896
while ((pgsql_result = PQgetResult (pgsql ))) {
@@ -3902,7 +3904,6 @@ static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
3902
3904
if (PQsetnonblocking (pgsql , 0 )) {
3903
3905
php_error_docref (NULL , E_NOTICE , "Cannot set connection to blocking mode" );
3904
3906
}
3905
- convert_to_boolean (return_value );
3906
3907
}
3907
3908
/* }}} */
3908
3909
@@ -4923,8 +4924,7 @@ PHP_PGSQL_API zend_result php_pgsql_convert(PGconn *pg_link, const zend_string *
4923
4924
break ; /* break out for() */
4924
4925
}
4925
4926
4926
- convert_to_boolean (is_enum );
4927
- if (Z_TYPE_P (is_enum ) == IS_TRUE ) {
4927
+ if (zval_is_true (is_enum )) {
4928
4928
/* enums need to be treated like strings */
4929
4929
data_type = PG_TEXT ;
4930
4930
} else {
0 commit comments