Bug #63578 [Nab]: is_callable returns false with __call
Edit report at https://bugs.php.net/bug.php?id=63578edit=1 ID: 63578 Updated by: dmi...@php.net Reported by:pierre at pcservice dot co dot za Summary:is_callable returns false with __call Status: Not a bug Type: Bug Package:*General Issues Operating System: mac linux PHP Version:Irrelevant Assigned To:dmitry Block user comment: N Private report: N New Comment: is_callable(array(new Controller, 'fooAction')); // call of a regular method _call() works fine. is_callable(array('Controller', 'fooAction')); // attempt to call a static method __call() doesn't try to call static methods, so is_callable() returns false. Previous Comments: [2012-11-22 07:50:43] pierre at pcservice dot co dot za so when calling is_callable(array('Foo', 'bar')), if the method doesn't exist, it only looks for a static method? with the following class Controller { public function testAction() { } public static function staticAction() { } public function __call($method, $arguments) { } } is_callable(array(new Controller, 'testAction')); is_callable(array(new Controller, 'staticAction')); is_callable(array(new Controller, 'fooAction')); is_callable(array('Controller', 'testAction')); is_callable(array('Controller', 'staticAction')); is_callable(array('Controller', 'fooAction')); everything returns true except for the last call. Shouldn't it return true as well, since the class has the magic __call method? Or the documentation should then at least specify that is_callable only works with the __call method, if the first parameter of the array is an instance of the object [2012-11-22 07:08:32] larue...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Class Foo { public function __call($method, $args) {} } Foo::bar(); //result in Fatal error: Call to undefined method Foo::bar() [2012-11-22 06:31:25] pierre at pcservice dot co dot za Description: When you have a class that have a __call magic method, when calling is_callable with an array and the first argument a string, it returns false. Test script: --- Class Foo { public function __call($method, $args) {} } var_dump(is_callable(array('Foo', 'bar'))); var_dump(is_callable(array(new Foo, 'bar'))); Expected result: true true Actual result: -- false true -- Edit this bug report at https://bugs.php.net/bug.php?id=63578edit=1
Bug #63521 [Com]: Adding 5 weekdays to Fri, Sat or Sun results in Sunday
Edit report at https://bugs.php.net/bug.php?id=63521edit=1 ID: 63521 Comment by: jon dot drummond at barrowsonline dot com Reported by:linesarefuzzy at gmail dot com Summary:Adding 5 weekdays to Fri, Sat or Sun results in Sunday Status: Open Type: Bug Package:Date/time related Operating System: Mac, Linux PHP Version:5.3.18 Block user comment: N Private report: N New Comment: Has anyone found a solution to this yet? We can not wait for a patch need a workaround in the mean time. Previous Comments: [2012-11-14 19:00:22] linesarefuzzy at gmail dot com Description: Adding 5 weekdays to a Friday, Saturday or Sunday returns the following Sunday instead of Friday. Same issue when adding multiples of 5. Starting with any other weekday works as expected, as does adding any other number of weekdays. Test script: --- echo date ( 'l, F j, Y', strtotime ( 'friday + 1 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 2 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 3 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 4 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 5 weekdays' ) ) . \n; echo \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 1 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 2 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 3 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 4 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 5 weekdays' ) ) . \n; echo \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 1 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 2 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 3 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 4 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 5 weekdays' ) ) . \n; Expected result: Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Friday, November 23, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Friday, November 23, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Friday, November 23, 2012 Actual result: -- Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Sunday, November 25, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Sunday, November 25, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Sunday, November 25, 2012 -- Edit this bug report at https://bugs.php.net/bug.php?id=63521edit=1
[PHP-BUG] Bug #63580 [NEW]: 1333152000 is incorrectly calculated at date()
From: me at ivangasparetto dot com Operating system: Linux PHP version: Irrelevant Package: Date/time related Bug Type: Bug Bug description:1333152000 is incorrectly calculated at date() Description: Please access http://www.4webhelp.net/us/timestamp.php?action=stampstamp=1333152000timezone=0 The UNIX timestamp 1333152000 should translate to 31 March 2012 00:00:00 Test script: --- echo date('d/m/y H:i:s', 1333152000); Expected result: 31/03/12 00:00:00 Actual result: -- 31/03/12 02:00:00 -- Edit bug report at https://bugs.php.net/bug.php?id=63580edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63580r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63580r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63580r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63580r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63580r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63580r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63580r=needscript Try newer version: https://bugs.php.net/fix.php?id=63580r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63580r=support Expected behavior: https://bugs.php.net/fix.php?id=63580r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63580r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63580r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63580r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63580r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63580r=dst IIS Stability: https://bugs.php.net/fix.php?id=63580r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63580r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63580r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63580r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63580r=mysqlcfg
Bug #60108 [Asn-Fbk]: GD cannot be compiled with system libgd
Edit report at https://bugs.php.net/bug.php?id=60108edit=1 ID: 60108 Updated by: paj...@php.net Reported by:ond...@php.net Summary:GD cannot be compiled with system libgd -Status: Assigned +Status: Feedback Type: Bug Package:GD related Operating System: Linux PHP Version:5.4.0beta2 Assigned To:pajoye Block user comment: N Private report: N New Comment: The fix is not only about adding that as far as I remember. Some refactoring in the ctx code would be necessary or drop stream output support completely when the system GD (2.1) is used. I wonder if adding the data member to the ctx struct in 2.0.x would break the ABI. I think it won't. Thoughts? That could be the most easier fix, and forward compatible by keeping stream output support for system gd users. Previous Comments: [2012-11-22 06:07:22] larue...@php.net ondrej, seems you have got a fix? could you make a patch for that? thanks [2012-11-21 22:48:02] public at petergeil dot name Confirmed ... problem still occurs in latest 5.4.8 release when compiled on Ubuntu 10.04 amd64 against libgd2-noxpm 2.0.36~rc1. However, adding a data member to gdIOCtx struct helps. (Thanks Brad) [2012-04-17 19:48:53] bero at bero dot eu Problem still occurs in php 5.4.1-RC2. Given apparently gd is maintained by php people these days, maybe the best fix is to make a new gd release containing all needed bits? [2011-11-16 08:15:06] brad at njoe dot com Confirmed the same build errors against the latest snapshot (php5.4- 201160530) with a system-wide libgd installed (version 2.0.36 versus the bundled 2.0.35). I also noted that the standard libgd version 2.0.35 doesn't include the 'void *data' member in the gdIOCtx struct. Modifying my /usr/include/gd_io.h to include this struct member seems to have also fixed(?) the build error, but that made me wonder... ... Why is the bundled libgd more of a bundled+customized-for-PHP library? It would seem that the 'void *data' member was introduced by the PHP dev team, unless I'm mistaken. Is this member's data important, and, if so, why is the bundled library modified to contain it (meaning that you really don't have an option between using the bundled library or your own system-wide version). [2011-10-21 12:13:35] ond...@php.net Description: When compiled with system-wide (not embedded) libgd library the compilation fails with: In file included from /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd.c:103:0: /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_putc': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:51:41: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_putbuf': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:58:41: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_stream_ctxfree': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:67:8: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:68:3: error: 'struct gdIOCtx' has no member named 'data' /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:69:6: error: 'struct gdIOCtx' has no member named 'data' In file included from /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd.c:103:0: /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c: In function '_php_image_output_ctx': /tmp/buildd/php5-5.4.0~beta2/ext/gd/gd_ctx.c:153:6: error: 'gdIOCtx' has no member named 'data' You need to wrap the _stream_ stuff inside the #ifdef HAVE_GD_BUNDLED -- Edit this bug report at https://bugs.php.net/bug.php?id=60108edit=1
[PHP-BUG] Bug #63581 [NEW]: Possible null dereference and buffer overflow
From: remi Operating system: GNU/Linux (Fedora 18) PHP version: 5.4.8 Package: FPM related Bug Type: Bug Bug description:Possible null dereference and buffer overflow Description: 1. possible null dereference = fpm/fpm/fpm_events.c|435| I'm not familiar with the code, but it seems to be possible NULL dereference. Please, consider the situation (on line 425) when the 'q' item is the latest one on the list -- q-next does not exist (== NULL). Next, if the 'q' is also fpm_event_queue_timer (I'm not sure if this may occur?), program will crash on NULL dereference. 2. Same situation - null dereference = fpm/fpm/fpm_events.c|191| Consider the queue length of 1. Than the condition (q == *queue) (line 189) must be true ~~ *queue = q-next (this is NULL) ~~ NULL-prev = NULL Again, I'm not sure if there may exist queue of single item. 3. off-by-one(two) (low prio) = fpm/fpm/fpm_log.c|459| The 'len' may be up to 1025 on this line. On line 149, consider 'len' to be equal to 1024 - program then continues down to line 453 where the 'len' is incremented. The problem could only occurs if, after increment (ligne 453), loop is not entered again. So when produced buffer is exactly 1024 or 1025. Test script: --- This issues where found from by static code analysis tool and, so, I can't provide any reproducer. -- Edit bug report at https://bugs.php.net/bug.php?id=63581edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63581r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63581r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63581r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63581r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63581r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63581r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63581r=needscript Try newer version: https://bugs.php.net/fix.php?id=63581r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63581r=support Expected behavior: https://bugs.php.net/fix.php?id=63581r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63581r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63581r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63581r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63581r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63581r=dst IIS Stability: https://bugs.php.net/fix.php?id=63581r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63581r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63581r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63581r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63581r=mysqlcfg
Bug #63581 [Com]: Possible null dereference and buffer overflow
Edit report at https://bugs.php.net/bug.php?id=63581edit=1 ID: 63581 Comment by: r...@php.net Reported by:r...@php.net Summary:Possible null dereference and buffer overflow Status: Open Type: Bug Package:FPM related Operating System: GNU/Linux (Fedora 18) PHP Version:5.4.8 Block user comment: N Private report: N New Comment: See https://github.com/php/php-src/pull/234 Previous Comments: [2012-11-22 13:43:12] r...@php.net Description: 1. possible null dereference = fpm/fpm/fpm_events.c|435| I'm not familiar with the code, but it seems to be possible NULL dereference. Please, consider the situation (on line 425) when the 'q' item is the latest one on the list -- q-next does not exist (== NULL). Next, if the 'q' is also fpm_event_queue_timer (I'm not sure if this may occur?), program will crash on NULL dereference. 2. Same situation - null dereference = fpm/fpm/fpm_events.c|191| Consider the queue length of 1. Than the condition (q == *queue) (line 189) must be true ~~ *queue = q-next (this is NULL) ~~ NULL-prev = NULL Again, I'm not sure if there may exist queue of single item. 3. off-by-one(two) (low prio) = fpm/fpm/fpm_log.c|459| The 'len' may be up to 1025 on this line. On line 149, consider 'len' to be equal to 1024 - program then continues down to line 453 where the 'len' is incremented. The problem could only occurs if, after increment (ligne 453), loop is not entered again. So when produced buffer is exactly 1024 or 1025. Test script: --- This issues where found from by static code analysis tool and, so, I can't provide any reproducer. -- Edit this bug report at https://bugs.php.net/bug.php?id=63581edit=1
Bug #63581 [Com]: Possible null dereference and buffer overflow
Edit report at https://bugs.php.net/bug.php?id=63581edit=1 ID: 63581 Comment by: r...@php.net Reported by:r...@php.net Summary:Possible null dereference and buffer overflow Status: Open Type: Bug Package:FPM related Operating System: GNU/Linux (Fedora 18) PHP Version:5.4.8 Block user comment: N Private report: N New Comment: I have forget, affected branches: 5.3, 5.4 and 5.5 Previous Comments: [2012-11-22 13:44:03] r...@php.net See https://github.com/php/php-src/pull/234 [2012-11-22 13:43:12] r...@php.net Description: 1. possible null dereference = fpm/fpm/fpm_events.c|435| I'm not familiar with the code, but it seems to be possible NULL dereference. Please, consider the situation (on line 425) when the 'q' item is the latest one on the list -- q-next does not exist (== NULL). Next, if the 'q' is also fpm_event_queue_timer (I'm not sure if this may occur?), program will crash on NULL dereference. 2. Same situation - null dereference = fpm/fpm/fpm_events.c|191| Consider the queue length of 1. Than the condition (q == *queue) (line 189) must be true ~~ *queue = q-next (this is NULL) ~~ NULL-prev = NULL Again, I'm not sure if there may exist queue of single item. 3. off-by-one(two) (low prio) = fpm/fpm/fpm_log.c|459| The 'len' may be up to 1025 on this line. On line 149, consider 'len' to be equal to 1024 - program then continues down to line 453 where the 'len' is incremented. The problem could only occurs if, after increment (ligne 453), loop is not entered again. So when produced buffer is exactly 1024 or 1025. Test script: --- This issues where found from by static code analysis tool and, so, I can't provide any reproducer. -- Edit this bug report at https://bugs.php.net/bug.php?id=63581edit=1
[PHP-BUG] Bug #63582 [NEW]: ReflectionClass-getProperties() omits private members of parent classes
From: anthon dot pang at gmail dot com Operating system: Ubuntu 12.04 PHP version: 5.5.0alpha1 Package: Reflection related Bug Type: Bug Bug description:ReflectionClass-getProperties() omits private members of parent classes Description: getProperties() doesn't include private scoped properties from parent classes Test script: --- ?php abstract class Foo { public $a; protected $b; private $c; } class Bar extends Foo { public $d; protected $e; private $f; } $obj = new Bar; $reflection = new ReflectionClass($obj); $propertyList = $reflection-getProperties(); foreach ($propertyList as $property) { var_dump($property-getName()); } Expected result: string(1) d string(1) e string(1) f string(1) a string(1) b string(1) c Actual result: -- string(1) d string(1) e string(1) f string(1) a string(1) b -- Edit bug report at https://bugs.php.net/bug.php?id=63582edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63582r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63582r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63582r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63582r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63582r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63582r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63582r=needscript Try newer version: https://bugs.php.net/fix.php?id=63582r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63582r=support Expected behavior: https://bugs.php.net/fix.php?id=63582r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63582r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63582r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63582r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63582r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63582r=dst IIS Stability: https://bugs.php.net/fix.php?id=63582r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63582r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63582r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63582r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63582r=mysqlcfg
[PHP-BUG] Bug #63583 [NEW]: Comparing objects is wrong
From: vadimx at gmail dot com Operating system: * PHP version: 5.3.18 Package: SimpleXML related Bug Type: Bug Bug description:Comparing objects is wrong Description: Comparing objects always returns false. How can i compare objects? Test script: --- $xml = 'ab//a'; $a = new SimpleXMLElement($xml); $b = new SimpleXMLElement($xml); var_dump($a == $b); Expected result: bool(true) Actual result: -- bool(false) -- Edit bug report at https://bugs.php.net/bug.php?id=63583edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63583r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63583r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63583r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63583r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63583r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63583r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63583r=needscript Try newer version: https://bugs.php.net/fix.php?id=63583r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=63583r=support Expected behavior: https://bugs.php.net/fix.php?id=63583r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63583r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63583r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63583r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63583r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63583r=dst IIS Stability: https://bugs.php.net/fix.php?id=63583r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=63583r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63583r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63583r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63583r=mysqlcfg
Bug #63528 [Com]: Generators crash on Zend\tests\generators\clone_with_stack.phpt
Edit report at https://bugs.php.net/bug.php?id=63528edit=1 ID: 63528 Comment by: a...@php.net Reported by:a...@php.net Summary:Generators crash on Zend\tests\generators\clone_with_stack.phpt Status: Assigned Type: Bug Package:*General Issues Operating System: Windows PHP Version:5.5Git-2012-11-15 (Git) Assigned To:nikic Block user comment: N Private report: N New Comment: No, only the mentioned test fails for me. Newly tested with both TS and NTS snaps from Nov 22th http://windows.php.net/downloads/snaps/php-5.5/ . A way to repro your fails? Previous Comments: [2012-11-21 12:04:07] ni...@php.net Is this the only test that is failing for you? I just played around with it on Windows and for me anything involving pushed stack arguments crashes. E.g. the yield_during_function_call test. [2012-11-15 15:57:05] a...@php.net Btw. there are no valgrind complains on Linux for this test. [2012-11-15 14:35:20] a...@php.net Description: Both TS and NTS crash. On a debug build VS gives the following error: Unhandled exception at 0x102D369E (php5ts_debug.dll) in php.exe: 0xC005: Access violation reading location 0x5A5A5A56. and the debugger stops in zend_execute.h:337 (second line in zend_vm_stack_clear_multiple()). Here is the corresponding BT: php5ts_debug.dll!zend_vm_stack_clear_multiple(void * * * tsrm_ls) Line 337 C php5ts_debug.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 736 C php5ts_debug.dll!ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 879 C php5ts_debug.dll!execute_ex(_zend_execute_data * execute_data, void * * * tsrm_ls) Line 436 C php5ts_debug.dll!execute(_zend_op_array * op_array, void * * * tsrm_ls) Line 461C php5ts_debug.dll!zend_execute_scripts(int type, void * * * tsrm_ls, _zval_struct * * retval, int file_count, ...) Line 1309 C php5ts_debug.dll!php_execute_script(_zend_file_handle * primary_file, void * * * tsrm_ls) Line 2468 C php.exe!do_cli(int argc, char * * argv, void * * * tsrm_ls) Line 988 C php.exe!main(int argc, char * * argv) Line 1364 C php.exe!__tmainCRTStartup() Line 582C php.exe!mainCRTStartup() Line 399 C kernel32.dll!76971866() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!770668f1()Unknown ntdll.dll!7706689d()Unknown Test script: --- Zend\tests\generators\clone_with_stack.phpt Expected result: Test diff: 001+ 001- string(10) xx Actual result: -- test pass -- Edit this bug report at https://bugs.php.net/bug.php?id=63528edit=1
Bug #63580 [Opn-Nab]: 1333152000 is incorrectly calculated at date()
Edit report at https://bugs.php.net/bug.php?id=63580edit=1 ID: 63580 Updated by: ahar...@php.net Reported by:me at ivangasparetto dot com Summary:1333152000 is incorrectly calculated at date() -Status: Open +Status: Not a bug Type: Bug Package:Date/time related Operating System: Linux PHP Version:Irrelevant Block user comment: N Private report: N New Comment: That timestamp is only midnight in UTC. Chances are that your PHP setup is configured to operate in a different time zone (check the date.timezone configuration setting in phpinfo()). Previous Comments: [2012-11-22 09:25:20] me at ivangasparetto dot com Description: Please access http://www.4webhelp.net/us/timestamp.php?action=stampstamp=1333152000timezone=0 The UNIX timestamp 1333152000 should translate to 31 March 2012 00:00:00 Test script: --- echo date('d/m/y H:i:s', 1333152000); Expected result: 31/03/12 00:00:00 Actual result: -- 31/03/12 02:00:00 -- Edit this bug report at https://bugs.php.net/bug.php?id=63580edit=1
Bug #63581 [Opn]: Possible null dereference and buffer overflow
Edit report at https://bugs.php.net/bug.php?id=63581edit=1 ID: 63581 Updated by: ahar...@php.net Reported by:r...@php.net Summary:Possible null dereference and buffer overflow Status: Open Type: Bug Package:FPM related Operating System: GNU/Linux (Fedora 18) PHP Version:5.4.8 -Assigned To: +Assigned To:fat Block user comment: N Private report: N New Comment: Jérôme, are you able to have a look at this, please? Previous Comments: [2012-11-22 13:47:34] r...@php.net I have forget, affected branches: 5.3, 5.4 and 5.5 [2012-11-22 13:44:03] r...@php.net See https://github.com/php/php-src/pull/234 [2012-11-22 13:43:12] r...@php.net Description: 1. possible null dereference = fpm/fpm/fpm_events.c|435| I'm not familiar with the code, but it seems to be possible NULL dereference. Please, consider the situation (on line 425) when the 'q' item is the latest one on the list -- q-next does not exist (== NULL). Next, if the 'q' is also fpm_event_queue_timer (I'm not sure if this may occur?), program will crash on NULL dereference. 2. Same situation - null dereference = fpm/fpm/fpm_events.c|191| Consider the queue length of 1. Than the condition (q == *queue) (line 189) must be true ~~ *queue = q-next (this is NULL) ~~ NULL-prev = NULL Again, I'm not sure if there may exist queue of single item. 3. off-by-one(two) (low prio) = fpm/fpm/fpm_log.c|459| The 'len' may be up to 1025 on this line. On line 149, consider 'len' to be equal to 1024 - program then continues down to line 453 where the 'len' is incremented. The problem could only occurs if, after increment (ligne 453), loop is not entered again. So when produced buffer is exactly 1024 or 1025. Test script: --- This issues where found from by static code analysis tool and, so, I can't provide any reproducer. -- Edit this bug report at https://bugs.php.net/bug.php?id=63581edit=1
Bug #63583 [Opn-Nab]: Comparing objects is wrong
Edit report at https://bugs.php.net/bug.php?id=63583edit=1 ID: 63583 Updated by: ahar...@php.net Reported by:vadimx at gmail dot com Summary:Comparing objects is wrong -Status: Open +Status: Not a bug Type: Bug Package:SimpleXML related Operating System: * PHP Version:5.3.18 Block user comment: N Private report: N New Comment: SimpleXML does implement object comparison, but it compares both the underlying document and node â if they aren't the same (and they aren't, in this case, since both new SimpleXMLElement() calls create new documents and nodes), then the objects aren't the same. Previous Comments: [2012-11-22 16:40:48] vadimx at gmail dot com Description: Comparing objects always returns false. How can i compare objects? Test script: --- $xml = 'ab//a'; $a = new SimpleXMLElement($xml); $b = new SimpleXMLElement($xml); var_dump($a == $b); Expected result: bool(true) Actual result: -- bool(false) -- Edit this bug report at https://bugs.php.net/bug.php?id=63583edit=1
Bug #63582 [Opn-Nab]: ReflectionClass-getProperties() omits private members of parent classes
Edit report at https://bugs.php.net/bug.php?id=63582edit=1 ID: 63582 Updated by: ahar...@php.net Reported by:anthon dot pang at gmail dot com Summary:ReflectionClass-getProperties() omits private members of parent classes -Status: Open +Status: Not a bug Type: Bug Package:Reflection related Operating System: Ubuntu 12.04 PHP Version:5.5.0alpha1 Block user comment: N Private report: N New Comment: Private properties and methods only exist within the exact class they are defined in: note that if you call getParentClass() on the $reflection object and then call getProperties() on that, c appears along with the other properties defined in Foo. Previous Comments: [2012-11-22 16:12:23] anthon dot pang at gmail dot com Description: getProperties() doesn't include private scoped properties from parent classes Test script: --- ?php abstract class Foo { public $a; protected $b; private $c; } class Bar extends Foo { public $d; protected $e; private $f; } $obj = new Bar; $reflection = new ReflectionClass($obj); $propertyList = $reflection-getProperties(); foreach ($propertyList as $property) { var_dump($property-getName()); } Expected result: string(1) d string(1) e string(1) f string(1) a string(1) b string(1) c Actual result: -- string(1) d string(1) e string(1) f string(1) a string(1) b -- Edit this bug report at https://bugs.php.net/bug.php?id=63582edit=1
Bug #63521 [Com]: Adding 5 weekdays to Fri, Sat or Sun results in Sunday
Edit report at https://bugs.php.net/bug.php?id=63521edit=1 ID: 63521 Comment by: linesarefuzzy at gmail dot com Reported by:linesarefuzzy at gmail dot com Summary:Adding 5 weekdays to Fri, Sat or Sun results in Sunday Status: Open Type: Bug Package:Date/time related Operating System: Mac, Linux PHP Version:5.3.18 Block user comment: N Private report: N New Comment: Jon-- Since the bug always results in Sunday when it should be Friday, an obvious workaround would be to test the weekday of the result, and if it's Sunday, subtract two days. For example: ?php if (date('l', $timestamp) == 'Sunday') $timestamp = strtotime(date('Y-m-d', $timestamp) . ' - 2 days'); ? Previous Comments: [2012-11-22 08:33:11] jon dot drummond at barrowsonline dot com Has anyone found a solution to this yet? We can not wait for a patch need a workaround in the mean time. [2012-11-14 19:00:22] linesarefuzzy at gmail dot com Description: Adding 5 weekdays to a Friday, Saturday or Sunday returns the following Sunday instead of Friday. Same issue when adding multiples of 5. Starting with any other weekday works as expected, as does adding any other number of weekdays. Test script: --- echo date ( 'l, F j, Y', strtotime ( 'friday + 1 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 2 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 3 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 4 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'friday + 5 weekdays' ) ) . \n; echo \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 1 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 2 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 3 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 4 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'saturday + 5 weekdays' ) ) . \n; echo \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 1 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 2 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 3 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 4 weekdays' ) ) . \n; echo date ( 'l, F j, Y', strtotime ( 'sunday + 5 weekdays' ) ) . \n; Expected result: Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Friday, November 23, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Friday, November 23, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Friday, November 23, 2012 Actual result: -- Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Sunday, November 25, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Sunday, November 25, 2012 Monday, November 19, 2012 Tuesday, November 20, 2012 Wednesday, November 21, 2012 Thursday, November 22, 2012 Sunday, November 25, 2012 -- Edit this bug report at https://bugs.php.net/bug.php?id=63521edit=1
Req #55078 [Com]: Can't use anonymous function inside array declaration inside a class
Edit report at https://bugs.php.net/bug.php?id=55078edit=1 ID: 55078 Comment by: nickmokisasian at gmail dot com Reported by:charlie at charliesomerville dot com Summary:Can't use anonymous function inside array declaration inside a class Status: Open Type: Feature/Change Request Package:Scripting Engine problem PHP Version:5.3.6 Block user comment: N Private report: N New Comment: When will this feature be supported? Previous Comments: [2011-07-01 18:46:57] fel...@php.net This is just more one limitation, not a bug. Changing to feature request. Thanks. [2011-06-29 23:54:37] charlie at charliesomerville dot com Description: You can't declare an anonymous function in an array declaration inside a class declaration. Test script: --- ?php class Foo { static $array = array(hi = function() { phpinfo(); }); } Foo::$array[hi](); Expected result: phpinfo being displayed Actual result: -- Parse error: syntax error, unexpected T_FUNCTION in /path/to/script.php on line 5 -- Edit this bug report at https://bugs.php.net/bug.php?id=55078edit=1
Bug #61272 [Com]: ob_start callback get passed empty string
Edit report at https://bugs.php.net/bug.php?id=61272edit=1 ID: 61272 Comment by: tdroenner at gmail dot com Reported by:peacech at gmail dot com Summary:ob_start callback get passed empty string Status: Re-Opened Type: Bug Package:Output Control Operating System: Arch 32 bit PHP Version:5.4.0 Block user comment: N Private report: N New Comment: When is a official fix for this available? Previous Comments: [2012-08-23 08:42:34] a dot vi at laposte dot net Hi again, I have used casper's patch. Compilation worked fine and it's all cool now. Thanks Casper Regards [2012-08-21 11:17:32] a dot vi at laposte dot net Same problem here with PHP5.4.6. I've had to patch my application and use: ob_end_flush(); ob_clean(); instead of: ob_end_clean(); I really agree with Casper: if this is not a change of behavior, this is a bug. My application was working really fine with PHP5.3.8 but was broken with PHP5.4.6. So something has changed Kind regards [2012-07-10 08:59:04] dragon829 at gmail dot com We have the same problem in 5.4.4,and it hasn't reproduced in 5.3.14 . [2012-06-08 08:03:50] casper at langemeijer dot eu Mike, I've dug a bit deeper into this problem, and must conclude that this really is a bug, or at least a change of behaviour. I think test tests/output/ob_017.phpt is faulty too. I corrected bot output.c and the test in the patch I supplied. In PHP 5.3 the callback function is called with the contents of the output buffer when ob_clean or ob_end_clean is called. The output will be fed to the callback function, but is erased right after that call. After your output buffering rewrite the output buffer is cleaned before the callback is called. I see no valid reason for a functional change. You're supplying the callback with a flag so that if needed the callback function could do this itself if needed. [2012-05-18 10:04:18] patrick at procurios dot nl We are having the same problem and it keeps us from migrating to 5.4. Could you please fix it? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61272 -- Edit this bug report at https://bugs.php.net/bug.php?id=61272edit=1
Bug #63580 [Nab]: 1333152000 is incorrectly calculated at date()
Edit report at https://bugs.php.net/bug.php?id=63580edit=1 ID: 63580 User updated by:me at ivangasparetto dot com Reported by:me at ivangasparetto dot com Summary:1333152000 is incorrectly calculated at date() Status: Not a bug Type: Bug Package:Date/time related Operating System: Linux PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Sorry, you are right. echo date('d/m/Y H:i:s I O', 1333152000); // 31/03/2012 02:00:00 1 +0200 Previous Comments: [2012-11-23 01:46:38] ahar...@php.net That timestamp is only midnight in UTC. Chances are that your PHP setup is configured to operate in a different time zone (check the date.timezone configuration setting in phpinfo()). [2012-11-22 09:25:20] me at ivangasparetto dot com Description: Please access http://www.4webhelp.net/us/timestamp.php?action=stampstamp=1333152000timezone=0 The UNIX timestamp 1333152000 should translate to 31 March 2012 00:00:00 Test script: --- echo date('d/m/y H:i:s', 1333152000); Expected result: 31/03/12 00:00:00 Actual result: -- 31/03/12 02:00:00 -- Edit this bug report at https://bugs.php.net/bug.php?id=63580edit=1