]> granicus.if.org Git - php/commit
Allow exceptions in __toString()
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 26 Feb 2019 14:32:18 +0000 (15:32 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 5 Jun 2019 12:25:07 +0000 (14:25 +0200)
commita31f46421d7bf6f55dd9ac5876b8e2eacf7e0708
tree24ffd7c5ae5e321c3994048fdd0fd9f68ae7457c
parent528aa7932a839fc6319979c34aa372805d8dc41c
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.
113 files changed:
UPGRADING
UPGRADING.INTERNALS
Zend/tests/bug26166.phpt
Zend/tests/bug28444.phpt
Zend/tests/bug30791.phpt
Zend/tests/bug60909_2.phpt
Zend/tests/bug70967.phpt
Zend/tests/bug72162.phpt
Zend/tests/call_with_refs.phpt
Zend/tests/class_properties_const.phpt
Zend/tests/closure_015.phpt
Zend/tests/exception_009.phpt
Zend/tests/exception_from_toString.phpt [new file with mode: 0644]
Zend/tests/instanceof_001.phpt
Zend/tests/unexpected_ref_bug.phpt
Zend/zend_API.c
Zend/zend_API.h
Zend/zend_builtin_functions.c
Zend/zend_execute.c
Zend/zend_object_handlers.c
Zend/zend_operators.c
Zend/zend_operators.h
Zend/zend_string.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/date/php_date.c
ext/dba/dba.c
ext/dom/attr.c
ext/dom/characterdata.c
ext/dom/document.c
ext/dom/node.c
ext/dom/processinginstruction.c
ext/dom/tests/toString_exceptions.phpt [new file with mode: 0644]
ext/exif/exif.c
ext/gd/gd.c
ext/iconv/iconv.c
ext/imap/php_imap.c
ext/intl/dateformat/dateformat_format_object.cpp
ext/intl/timezone/timezone_class.cpp
ext/intl/timezone/timezone_methods.cpp
ext/intl/transliterator/transliterator_class.c
ext/intl/transliterator/transliterator_methods.c
ext/libxml/libxml.c
ext/mbstring/mbstring.c
ext/mbstring/php_mbregex.c
ext/mysqli/mysqli.c
ext/mysqli/mysqli_api.c
ext/mysqlnd/mysqlnd_ps_codec.c
ext/oci8/oci8_statement.c
ext/odbc/php_odbc.c
ext/openssl/openssl.c
ext/openssl/tests/bug38261.phpt
ext/openssl/tests/openssl_pkcs7_decrypt_error.phpt
ext/openssl/xp_ssl.c
ext/pcntl/pcntl.c
ext/pcre/php_pcre.c
ext/pcre/tests/preg_replace_error1.phpt
ext/pcre/tests/preg_replace_error2.phpt
ext/pdo/pdo_sql_parser.re
ext/pdo/pdo_stmt.c
ext/pdo/php_pdo_driver.h
ext/pdo_firebird/firebird_driver.c
ext/pdo_firebird/firebird_statement.c
ext/pdo_oci/oci_driver.c
ext/pdo_oci/oci_statement.c
ext/pdo_pgsql/pgsql_driver.c
ext/pdo_sqlite/sqlite_driver.c
ext/pdo_sqlite/sqlite_statement.c
ext/pdo_sqlite/tests/pdo_sqlite_tostring_exception.phpt [new file with mode: 0644]
ext/pgsql/pgsql.c
ext/readline/readline.c
ext/reflection/php_reflection.c
ext/reflection/tests/bug74673.phpt
ext/session/session.c
ext/simplexml/simplexml.c
ext/snmp/snmp.c
ext/sockets/conversions.c
ext/spl/spl_iterators.c
ext/spl/tests/iterator_036.phpt
ext/spl/tests/recursive_tree_iterator_007.phpt
ext/sqlite3/sqlite3.c
ext/sqlite3/tests/exception_from_toString.phpt [new file with mode: 0644]
ext/standard/array.c
ext/standard/assert.c
ext/standard/basic_functions.c
ext/standard/filters.c
ext/standard/formatted_print.c
ext/standard/head.c
ext/standard/math.c
ext/standard/pack.c
ext/standard/password.c
ext/standard/proc_open.c
ext/standard/streamsfuncs.c
ext/standard/string.c
ext/standard/tests/array/array_multisort_variation8.phpt
ext/standard/tests/class_object/get_class_methods_variation_001.phpt
ext/standard/tests/class_object/get_parent_class_variation_002.phpt
ext/standard/tests/general_functions/type.phpt
ext/standard/tests/math/base_convert_error.phpt
ext/standard/tests/streams/bug61115.phpt
ext/standard/tests/strings/strval_error.phpt
ext/standard/var.c
ext/xml/xml.c
ext/xmlreader/php_xmlreader.c
ext/xmlrpc/xmlrpc-epi-php.c
ext/xsl/xsltprocessor.c
ext/zip/php_zip.c
ext/zlib/zlib.c
main/streams/userspace.c
tests/classes/tostring_001.phpt
tests/classes/tostring_003.phpt
tests/classes/tostring_004.phpt
win32/codepage.c