1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

593 Commits

Author SHA1 Message Date
Dmitry Stogov 715d5d2855 Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Rodrigo Prado 6bd3ace67e Check the function UConverter::getAvailable with parameter wrong 2015-08-06 00:10:37 -03:00
Anatol Belski 4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Nikita Popov 5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Aaron Piotrowski 1c7619491e Fix failing tests from exception code changes 2015-07-07 23:14:05 -05: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
Anatol Belski 333db013fd change the inclusion order which fixes the vc build 2015-07-01 15:21:34 +02:00
Dmitry Stogov f7b6de5b5e Cleanup (avoid string reallocations) 2015-07-01 13:26:39 +03:00
Dmitry Stogov 4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +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
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
Ferenc Kovacs 7ec3016e29 fix hard-coded path in test 2015-06-09 16:42:02 +02:00
Anatol Belski f378b9a998 fix test title 2015-05-18 22:37:31 +02:00
Anatol Belski 6fe4f18dcd fork test for ICU >= 55.1 compat 2015-05-18 22:37:29 +02:00
Anatol Belski 8af0de914f sync test with exception currently thrown 2015-05-18 22:37:28 +02:00
Anatol Belski d3515bdef0 fork test for ICU >= 55.1 compat 2015-05-18 22:37:26 +02:00
Anatol Belski bb27f4ca8b fork test for ICU >= 55.1 compat 2015-05-18 22:37:25 +02:00
Anatol Belski 83f98277c2 skip test for ICU >= 55.1, a newer test is available and passes 2015-05-18 22:37:23 +02:00
Anatol Belski 3658412814 fork test for ICU >= 55.1 compat 2015-05-18 22:37:22 +02:00
Anatol Belski 30be2e654e fork test for ICU >= 55.1 compat 2015-05-18 22:37:21 +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 440481fb3e Display TypeExceptions like normal exceptions
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
2015-05-17 19:54:12 +02: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 434a46612e Fix a few missed tests. 2015-05-16 22:04:16 -05: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
Dmitry Stogov e96616739c Fixed redundand internal constructor behavior (they shouldn't return NULL anymore) 2015-05-07 10:38:47 +03:00
Nikita Popov e74b84a9fe Fix Intl constructor leaks
Drop the Z_OBJ(return_value) = NULL hack and return status code
from ctor function instead.
2015-04-17 10:33:59 +02:00
Nikita Popov 25affa8a0f Fix leak in transliterator_transliterate() 2015-04-17 10:33:58 +02:00
Nikita Popov 8138756295 Fix leak in IntlDateFormatter::getTimeZone() 2015-04-17 09:28:38 +02:00
Nikita Popov 4e2be45309 Fix leak in IntlCalendar::fromDateTime() 2015-04-17 09:28:36 +02: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 a0eaa37afe missing includes 2015-04-01 13:39:25 +02:00
Anatol Belski e271ace5f8 fix extern "C"
now, it shouldn't matter where intl_common.h is included,
not need for extra putting it into extern C
2015-04-01 13:18:52 +02:00
Anatol Belski ca1ef2749d C89 compat 2015-04-01 13:18:51 +02:00
Nikita Popov cf0ffa8e4c Remove datefmt_set_timezone_id and OO variant 2015-04-01 12:34:28 +02:00
Dmitry Stogov 2afca9f179 Fixed test 2015-03-30 21:48:54 +03:00
Dmitry Stogov 1018f462d8 Patch improvement:
Removed the corresponding core code.
Fixed ext/com_dotnet and ext/date.
Refactored ext/intl changes.
Improved ext/fileinfo and ext/pdo changes.
Fixed tests.
2015-03-30 18:53:38 +03:00
Dmitry Stogov 9155a267ad Merge branch 'InternalClassClean' of github.com:Danack/php-src into InternalClassClean
* 'InternalClassClean' of github.com:Danack/php-src:
  Fixed indentation. Fixed comment style. Fixed commented out code.
  Reverted change to function name and added note of why it is different from the class it is actually changing.
  Made UConverter throw an exception if the constructor fails.
  Fixed PDO constructor to not return null.
  Fixed fileinfo behaviour.
  Made Phar throw exception on bad constructor.
  Converted intl extension to use IntlException in constructors.
  Fixed SplFixedArray and tests.
  Fixed ReflectionExtension and ReflectionProperty.
  Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.
  Fixed PDORow behaviour and message.
2015-03-30 12:14:43 +03:00
Anatol Belski 2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Rasmus Lerdorf f01071f55f Remove extraneous strlen() call 2015-03-21 08:26:06 -07:00
Danack 910a324306 Fixed indentation. Fixed comment style. Fixed commented out code. 2015-03-16 23:14:56 +00:00
Danack 9803fccfbc Made UConverter throw an exception if the constructor fails. 2015-03-15 15:30:25 +00:00
Danack 99dae96dc0 Converted intl extension to use IntlException in constructors. 2015-03-15 13:59:48 +00:00
Lior Kaplan a4384bd3d4 s/PHP Version 5/PHP Version 7/g
Follow up for d0cb7153
2015-03-13 11:09:42 +02:00
Dmitry Stogov 8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00