Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

E_NOTICE with trait method aliases #104

Open
kynx opened this issue Mar 4, 2017 · 1 comment
Open

E_NOTICE with trait method aliases #104

kynx opened this issue Mar 4, 2017 · 1 comment

Comments

@kynx
Copy link

kynx commented Mar 4, 2017

I'm getting Notice: Undefined offset: 1 in /path/to/vendor/zendframework/zend-code/src/Scanner/ClassScanner.php on line 596 using 3.1.0. It looks like this happens with aliased trait methods:

trait A 
{
    function a() {
        // does something
    }
}

class B 
{
    use A {
        a as b;
    }

    function a() {
        b();
        // do something more
    }
}

Stepping through the code it looks like $alias['original'] does not contain '::', causing the notice. I ran into this using zend-expressive-tooling on an existing project. It doesn't seem to cause anything other than annoyance, but I'm not sure if just adding a check for '::' would hide a deeper problem. Thoughts?

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-code; a new issue has been opened at laminas/laminas-code#15.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants