Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magic constant ::class (PHP5.5) #4

Closed
eddi13 opened this issue Apr 4, 2015 · 1 comment
Closed

Magic constant ::class (PHP5.5) #4

eddi13 opened this issue Apr 4, 2015 · 1 comment

Comments

@eddi13
Copy link

eddi13 commented Apr 4, 2015

http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class

class Command {
    private $controllerClass = Controller::class;
}

Uninitialized string offset: 1 in ...\autoloadManager.php on line 391

I fix that with

private function getClassesFromFile($file) {
...
    case T_INTERFACE:
    case T_CLASS:
    case T_TRAIT:
    //fix begin
    if(($tokens[$i][0] === T_CLASS) && $tokens[$i-1][0] === T_DOUBLE_COLON) {
        continue(2);
    }
    //fix end
    $i+=2;
    if ($namespace)
    {
        $classes[] = strtolower($namespace . '\\' . $tokens[$i][1]);//line 391
    }
...
}
alfallouji pushed a commit that referenced this issue Apr 16, 2015
@alfallouji
Copy link
Owner

Fixed - Thanks for your feedback

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

No branches or pull requests

2 participants