ID:               50148
 Updated by:       fel...@php.net
 Reported By:      yoarvi at gmail dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Unicode Engine related
 Operating System: Solaris 10/SPARC
 PHP Version:      6SVN-2009-11-11 (SVN)
 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks!


Previous Comments:
------------------------------------------------------------------------

[2009-11-11 10:43:01] yoarvi at gmail dot com

Description:
------------
When I ran 'gmake test' on my PHP6 tree on Solaris 10 (SPARC), I
noticed many test failures.



The following patch fixes many(~350) of these test failures:

Index: Zend/zend_object_handlers.c
===================================================================
--- Zend/zend_object_handlers.c (revision 290471)
+++ Zend/zend_object_handlers.c (working copy)
@@ -198,7 +198,7 @@
        ulong h;

        if ((Z_TYPE_P(member) == IS_UNICODE && Z_USTRVAL_P(member)[0]
== 0) ||
-           Z_STRVAL_P(member)[0] == '\0') {
+           (Z_TYPE_P(member) == IS_STRING && Z_STRVAL_P(member)[0] ==
'\0')) {
                if (!silent) {
                        if (Z_UNILEN_P(member) == 0) {
                                zend_error(E_ERROR, "Cannot access
empty property");


Reproduce code:
---------------
% sapi/cli/php tests/classes/__call_001.php


Expected result:
----------------
Method test called:
array(4) {
  [0]=>
  int(1)
  [1]=>
  unicode(1) "2"
  [2]=>
  float(3.4)
  [3]=>
  bool(true)
}
array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
}


Actual result:
--------------
Method test called:
array(4) {
  [0]=>
  int(1)
  [1]=>
  unicode(1) "2"
  [2]=>
  float(3.4)
  [3]=>
  bool(true)
}

Fatal error: Cannot access property started with '\0' in
/space/arvind/php-src-6/tests/classes/__call_001.phpt on line 14


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50148&edit=1

Reply via email to