Commit Graph

6968 Commits

Author SHA1 Message Date
Stanislav Malyshev
b187c35f23 Merge branch 'pull-request/54'
* pull-request/54:
  Allow arbitrary expressions for empty()

    This change is as per RFC https://wiki.php.net/rfc/empty_isset_exprs.

    The change allows passing the result of function calls and other
    expressions to the empty() language construct. This is accomplished by
    simply rewriting empty(expr) to !expr.

    The change does not affect the suppression of errors when using empty()
    on variables. empty($undefinedVar) will continue not to throw errors.
    When an expression is used inside empty() on the other hand, errors will
    not be suppressed. Thus empty($undefinedVar + $somethingElse) *will*
    throw a notice.

    The change also does not make empty() into a real function, so using
    'empty' as a callback is still not possible.

    In addition to the empty() changes the commit adds nicer error messages
    when isset() is used on function call results or other expressions.
2012-05-24 14:18:12 -05:00
Gustavo André dos Santos Lopes
d4fd95e292 Merge branch '5.4' 2012-05-24 11:09:18 +02:00
Nuno Lopes
58d2203317 add support for the alloc_size __attribute__ (through ZEND_ATTRIBUTE_ALLOC_SIZE and ZEND_ATTRIBUTE_ALLOC_SIZE2
requires GCC >= 4.3 or clang >= 3.2 to perform anything useful
2012-05-23 22:18:01 -04:00
Gustavo André dos Santos Lopes
acd711685a Fixed bug #62097
This fixes the fix for bug #54547 in 32-bit machines by accepting
float comparisons in 32-bit machines as long as the integer is
not larger than the mantissa.
2012-05-23 18:55:36 -05:00
Xinchen Hui
9126bc790a Merge branch 'PHP-5.4'
* PHP-5.4:
  Use free instead of efree
2012-05-21 19:06:50 +08:00
Xinchen Hui
4c9a11c857 Use free instead of efree 2012-05-21 19:02:45 +08:00
Xinchen Hui
fba724d2f7 Merge branch 'PHP-5.4'
* PHP-5.4:
  Use emalloc instead of malloc
2012-05-21 18:59:16 +08:00
Xinchen Hui
bbcea230e1 Use emalloc instead of malloc 2012-05-21 18:58:19 +08:00
Dmitry Stogov
90e23107a2 Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 14:04:33 +04:00
Dmitry Stogov
2ae8d2fbfb Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 13:57:41 +04:00
Dmitry Stogov
c8f47a8e7c Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 13:46:07 +04:00
Dmitry Stogov
7632a32ef9 Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution) 2012-05-21 12:53:21 +04:00
Stanislav Malyshev
d03900dc92 fix bug #61782 - __clone/__destruct do not match other methods when checking access controls 2012-05-14 11:03:21 -07:00
Stanislav Malyshev
47db8a9aa1 fix bug #54547 2012-05-14 11:03:20 -07:00
Stanislav Malyshev
a0dff6fdca fix bug #61782 - __clone/__destruct do not match other methods when checking access controls 2012-05-13 14:40:44 -07:00
Stanislav Malyshev
9344bf193c fix bug #54547 2012-05-13 14:40:44 -07:00
Nikita Popov
ec061a93c5 Allow arbitrary expressions for empty()
This change is as per RFC https://wiki.php.net/rfc/empty_isset_exprs.

The change allows passing the result of function calls and other
expressions to the empty() language construct. This is accomplished by
simply rewriting empty(expr) to !expr.

The change does not affect the suppression of errors when using empty()
on variables. empty($undefinedVar) will continue not to throw errors.
When an expression is used inside empty() on the other hand, errors will
not be suppressed. Thus empty($undefinedVar + $somethingElse) *will*
throw a notice.

The change also does not make empty() into a real function, so using
'empty' as a callback is still not possible.

In addition to the empty() changes the commit adds nicer error messages
when isset() is used on function call results or other expressions.
2012-05-13 14:56:51 +02:00
Xinchen Hui
5852e5f48d Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
  fix stack overflow in php_intlog10abs()
  fix stack overflow in php_intlog10abs()
2012-05-12 13:21:49 +08:00
Xinchen Hui
6a5095582a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object)
  fix stack overflow in php_intlog10abs()

Conflicts:
	Zend/zend_execute.c
2012-05-12 13:19:55 +08:00
Xinchen Hui
3332943c9d Fixed Bug #62005 (unexpected behavior when incrementally assigning to a member of a null object) 2012-05-12 13:13:44 +08:00
Xinchen Hui
e7934c0ffa Merge branch 'PHP-5.4' 2012-05-11 20:27:07 +08:00
Reeze Xia
0cb4849e53 Cleanup useless function declaration for traits 2012-05-11 16:52:12 +08:00
Xinchen Hui
6b16f7cd69 Merge branch 'PHP-5.4' 2012-05-03 22:40:51 +08:00
Xinchen Hui
72f19e9a8b Fixed bug #61922 (ZTS build doesn't accept zend.script_encoding config) 2012-05-03 22:39:53 +08:00
Xinchen Hui
e022bfe34a Merge remote-tracking branch 'origin/PHP-5.4'
* origin/PHP-5.4:
  Fixed test bug #61892
2012-05-03 20:00:10 +08:00
Xinchen Hui
d74d88fbb9 Fixed test bug #61892 2012-05-03 19:56:49 +08:00
Xinchen Hui
604d11ee6c Merge remote-tracking branch 'origin/PHP-5.4' 2012-05-03 18:41:45 +08:00
Xinchen Hui
75d23f5714 Merge remote-tracking branch 'origin/PHP-5.3' into PHP-5.4
* origin/PHP-5.3:
  Fix typo
2012-05-03 18:40:57 +08:00
Xinchen Hui
bbf8a50281 Fix typo
picked form pull request of reeze.xia@gmail.com
2012-05-03 18:39:03 +08:00
Felipe Pena
1c2c620a58 - Regenerated files 2012-04-30 15:57:09 -03:00
Felipe Pena
4deb0f1a0a - Regenerated files 2012-04-30 15:57:00 -03:00
Felipe Pena
45ef3c759e Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed Windows build
2012-04-30 15:56:15 -03:00
Felipe Pena
79961dccab - Fixed Windows build 2012-04-30 15:55:57 -03:00
Felipe Pena
1622843162 - Regenerated files 2012-04-30 10:35:28 -03:00
Felipe Pena
ea23192910 - Regenerated files 2012-04-30 10:35:11 -03:00
Felipe Pena
73b6150992 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Changed last commit to use VK_ESCAPE on Windows
2012-04-30 10:31:59 -03:00
Felipe Pena
3120387617 - Changed last commit to use VK_ESCAPE on Windows 2012-04-30 10:31:49 -03:00
Felipe Pena
bbe9eec9a2 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net
2012-04-29 19:36:10 -03:00
Felipe Pena
cc5b995c78 - Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net 2012-04-29 19:35:52 -03:00
Xinchen Hui
6b9e88d9e6 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash)
2012-04-18 18:15:29 +08:00
Xinchen Hui
da6465a268 Fixed bug #61761 ('Overriding' a private static method with a different signature causes crash) 2012-04-18 18:13:27 +08:00
Xinchen Hui
565892d4c0 Implement const array/string dereference
RFC:https://wiki.php.net/rfc/constdereference
2012-04-17 10:06:17 +08:00
Stanislav Malyshev
363797e9af Merge branch 'PHP-5.4'
* PHP-5.4:
  Copy default properties of internal classes for different threads
2012-04-11 19:24:11 -07:00
Johannes Schlüter
82c05eeda9 Copy default properties of internal classes for different threads 2012-04-11 19:21:41 -07:00
Nikita Popov
b233de098d Fix bug #61681: Malformed grammar
Generate T_STRING_VARNAME only if it actually is one. This is only the case
for "${varname}" and "${varname[offset]}" so we can just add a check for
} or [ after the LABEL.
2012-04-09 18:26:38 +02:00
Gustavo André dos Santos Lopes
298e9d2932 Merge branch '5.4' 2012-03-28 08:58:09 +01:00
Gustavo André dos Santos Lopes
68990224be Merge branch '5.3' into 5.4
Zend/zend_language_scanner.c and Zend/zend_language_scanner_defs.h had to be changed manually.
2012-03-28 08:57:19 +01:00
Gustavo André dos Santos Lopes
c6e15455a3 Revert "- fix bug #61504, fix build errors on windows and possibly other"
This reverts commit 74ee335e3a.
2012-03-28 08:41:18 +01:00
Pierre Joye
13bd9c2c3d Merge branch 'PHP-5.4'
* PHP-5.4:
  - fix bug #61504, fix build errors on windows and possibly other

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2012-03-28 02:15:02 +02:00
Pierre Joye
c195596280 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - fix bug #61504, fix build errors on windows and possibly other

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2012-03-28 02:11:06 +02:00