mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +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
|
@ -153,7 +153,9 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
|
|||
pdo_sqlite_error_stmt(stmt);
|
||||
return 0;
|
||||
} else {
|
||||
convert_to_string(parameter);
|
||||
if (!try_convert_to_string(parameter)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (SQLITE_OK == sqlite3_bind_blob(S->stmt, param->paramno + 1,
|
||||
|
@ -176,7 +178,9 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
|
|||
return 1;
|
||||
}
|
||||
} else {
|
||||
convert_to_string(parameter);
|
||||
if (!try_convert_to_string(parameter)) {
|
||||
return 0;
|
||||
}
|
||||
if (SQLITE_OK == sqlite3_bind_text(S->stmt, param->paramno + 1,
|
||||
Z_STRVAL_P(parameter),
|
||||
Z_STRLEN_P(parameter),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue