mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
This commit is contained in:
parent
528aa7932a
commit
a31f46421d
113 changed files with 1402 additions and 486 deletions
|
@ -411,7 +411,10 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
|
|||
break;
|
||||
|
||||
default:
|
||||
convert_to_string_ex(&retval);
|
||||
if (!try_convert_to_string(&retval)) {
|
||||
ret = FAILURE;
|
||||
break;
|
||||
}
|
||||
sqlite3_result_text(context, Z_STRVAL(retval), Z_STRLEN(retval), SQLITE_TRANSIENT);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue