logo       

cvs: ZendEngine2 / zend_interfaces.c /tests bug38624.phpt: msg#00068

Subject: cvs: ZendEngine2 / zend_interfaces.c /tests bug38624.phpt
tony2001                Mon Aug 28 10:25:49 2006 UTC

  Added files:                 
    /ZendEngine2/tests  bug38624.phpt 

  Modified files:              
    /ZendEngine2        zend_interfaces.c 
  Log:
  fix #38624 (Strange warning when incrementing an object property and 
exception is thrown from __get method)
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_interfaces.c?r1=1.54&r2=1.55&diff_format=u
Index: ZendEngine2/zend_interfaces.c
diff -u ZendEngine2/zend_interfaces.c:1.54 ZendEngine2/zend_interfaces.c:1.55
--- ZendEngine2/zend_interfaces.c:1.54  Wed May 31 18:59:42 2006
+++ ZendEngine2/zend_interfaces.c       Mon Aug 28 10:25:49 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_interfaces.c,v 1.54 2006/05/31 18:59:42 tony2001 Exp $ */
+/* $Id: zend_interfaces.c,v 1.55 2006/08/28 10:25:49 tony2001 Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -93,7 +93,9 @@
                if (!obj_ce) {
                        obj_ce = object_pp ? Z_OBJCE_PP(object_pp) : NULL;
                }
-               zend_error(E_CORE_ERROR, "Couldn't execute method %v%s%s", 
obj_ce ? obj_ce->name : EMPTY_ZSTR, obj_ce ? "::" : "", function_name);
+               if (!EG(exception)) {
+                       zend_error(E_CORE_ERROR, "Couldn't execute method 
%v%s%s", obj_ce ? obj_ce->name : EMPTY_ZSTR, obj_ce ? "::" : "", function_name);
+               }
        }
        if (!retval_ptr_ptr) {
                if (retval) {

http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug38624.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/bug38624.phpt
+++ ZendEngine2/tests/bug38624.phpt
--TEST--
Bug #38624 (Strange warning when incrementing an object property and exception 
is thrown from __get method)
--FILE--
<?php

class impl
{
    public function __construct()
    {
       $this->counter++;
    }
    public function __set( $name, $value )
    {
        throw new Exception( "doesn't work" );
    }

    public function __get( $name )
    {
        throw new Exception( "doesn't work" );
    }

}

$impl = new impl();

echo "Done\n";
?>
--EXPECTF--     
Fatal error: Uncaught exception 'Exception' with message 'doesn't work' in %s:%d
Stack trace:
#0 %s(%d): impl->__get('counter')
#1 %s(%d): impl->__construct()
#2 {main}
  thrown in %s on line %d

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe