ID:               43703
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: Irrelevant
 PHP Version:      5.3CVS-2007-12-29 (CVS)
 Assigned To:      dmitry
 New Comment:

I think the issue lies in the following code in zend_compile.c:

if (fe->common.type == ZEND_USER_FUNCTION &&
    strchr(proto->common.arg_info[i].class_name, ':') == NULL &&
    (colon = zend_memrchr(fe->common.arg_info[i].class_name, ':',
fe->common.arg_info[i].class_name_len)) != NULL &&
    strcmp(colon+1, proto->common.arg_info[i].class_name) == 0) {
        efree((char*)fe->common.arg_info[i].class_name);
        fe->common.arg_info[i].class_name =
estrndup(proto->common.arg_info[i].class_name,
proto->common.arg_info[i].class_name_len);
        fe->common.arg_info[i].class_name_len =
proto->common.arg_info[i].class_name_len;
} else {
        return 0;
}


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

[2007-12-29 10:52:59] [EMAIL PROTECTED]

Description:
------------
When a namespaced class extends an namespaced abstract class, the
signature compatiblity check breaks.

Reproduce code:
---------------
test.php
<?php
require 'joinpoint.php';
require 'pointcut.php';
require 'read.php';

joinpoint.php
<?php
namespace GAP;

class JoinPoint
{
}

pointcut.php
<?php
namespace GAP;

abstract class Pointcut
{
    abstract public function evaluate(JoinPoint $joinPoint);
}

read.php
<?php
namespace GAP::Pointcut::Attribute;

use GAP::Joinpoint;
use GAP::Pointcut;

class Read extends Pointcut
{
    public function evaluate(JoinPoint $joinPoint)
    {
    }
}

Expected result:
----------------
No syntax error.

Actual result:
--------------
Fatal error: Declaration of GAP::Pointcut::Attribute::Read::evaluate()
must be compatible with that of GAP::Pointcut::evaluate() in
/home/sb/read.php on line 12


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


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

Reply via email to