1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Commit Graph

522 Commits

Author SHA1 Message Date
Anatol Belski a3dceb485a fix test 2015-08-26 16:39:48 +02:00
Anatol Belski 2c523f21c9 add range checks to simplexml 2015-08-26 16:39:47 +02:00
Nikita Popov 36e49c702b Fix simplexml warnings 2015-07-17 21:12:15 +02:00
Aaron Piotrowski ed1b64877d Switch position of ce in exception ce variable names 2015-07-03 09:45:03 -05:00
Aaron Piotrowski a812a74c2e Change zend_exception_get_default() to zend_exception_ce 2015-07-03 09:44:48 -05:00
Dmitry Stogov 6daed13c8b Cleanup (removed dead code) 2015-07-01 22:18:40 +03:00
Dmitry Stogov 4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Rasmus Lerdorf 28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Aaron Piotrowski 77cf6d81b4 Fix some missed tests 2015-06-15 08:20:30 -05:00
Aaron Piotrowski 110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Dmitry Stogov 1c754f0b71 Get rid of more ZVAL_ZVAL() macros 2015-06-12 13:33:14 +03:00
Dmitry Stogov 8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Nikita Popov 5d3cf577aa Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.

All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).

What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.

Also fixes bug #69788.
2015-06-11 23:23:57 +02:00
Christoph M. Becker c1401ad7b6 split simplexml tests for 7 2015-05-31 21:35:21 +02:00
Christoph M. Becker 36eb66692c removed test for unrelated bug #68946 2015-05-29 20:43:40 +02:00
Christoph M. Becker f27b9ead6b fixed whitespace dependend behavior of casting SimpleXMLElements to boolean 2015-05-29 20:43:38 +02:00
Christoph M. Becker 8e5b906459 added tests for bug #61335, bug #67572 and bug #68946 (the latter already passing, but better safe than sorry) 2015-05-29 20:43:36 +02:00
Christoph M. Becker db4a6def47 fixed whitespace depending (mis)behavior of var_dump'ing and print_r'ing SimpleXMLElements 2015-05-29 20:43:34 +02:00
Christoph M. Becker 1a3a674ee6 added failing tests for bug #62639, bug #67116, bug #69169 and bug #69491 2015-05-29 20:43:33 +02:00
Aaron Piotrowski e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov 3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski 64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Nikita Popov c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Anatol Belski becfdeb2ff improve searchability for libxml2 headers
and bring the configs inline with the current libxml2 build
2015-05-10 22:22:03 +02:00
Xinchen Hui 55d94a4532 Merge branch 'master' of git.php.net:php-src 2015-05-06 10:51:52 +08:00
Dmitry Stogov f6663c7201 Loop splitting and specialization 2015-05-05 18:51:08 +03:00
Dmitry Stogov 81dd375b5f Fixed compilation warning 2015-05-05 16:28:54 +03:00
Dmitry Stogov 275afbacd1 Use zend heap instead of system 2015-05-05 16:06:10 +03:00
Dmitry Stogov a610e8c4c6 Use better zend_hash_*() functions. 2015-05-05 12:58:11 +03:00
Dmitry Stogov 17e4c62872 Removed check for count() in SXE class 2015-05-05 12:57:30 +03:00
Xinchen Hui 5f8bc73fc3 fixed comment 2015-05-05 17:37:42 +08:00
Xinchen Hui 7b9e4e19e1 Unused macros 2015-05-05 17:25:25 +08:00
Xinchen Hui 8c0ebb4c5d Optimize cast simplexml to IS_BOOL 2015-05-05 17:23:54 +08:00
Xinchen Hui b6e893c143 Unused var 2015-05-05 17:02:54 +08:00
Dmitry Stogov 859aa06205 Avoid repeatable lookups for count() method in the same class entry. 2015-05-05 11:10:21 +03:00
Nikita Popov 122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Anatol Belski 663074b6b1 cleanup mod version macros and mod defs, round x 2015-03-23 21:30:22 +01:00
Anatol Belski 88b2a2d405 export useful symbols from ext/simplexml 2015-03-23 18:33:37 +01:00
Anatol Belski 567565b24f more fixes to the shared compilation 2015-03-23 15:09:09 +01:00
Dmitry Stogov a30d328671 Errors converted to exceptions are not "recoverable" anymore. 2015-03-10 10:31:55 +03:00
Dmitry Stogov 1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00
Dmitry Stogov 9e70d7672d Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. 2015-02-04 15:24:13 +03:00
Michael Wallner 960d103d63 fix warnings 2015-01-30 21:36:23 +01:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Stanislav Malyshev b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Dmitry Stogov 6ec5ab77df Improved trim/ltrim/rtrim functions.
Now php_trim() operates on zend_string and returns zend_string (it may return the same zend_string).
2014-12-23 04:29:41 +03:00
Andrea Faulds e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Andrea Faulds 55e1c032e5 skip simplexml 2014-11-28 23:45:28 +00:00