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

[ticket/12314] Workaround HHVM SPL autoloader sometimes using leading ba... #2192

Merged
merged 1 commit into from Mar 29, 2014

Conversation

bantu
Copy link
Collaborator

@bantu bantu commented Mar 28, 2014

$class = '\\' . $class;
// In general $class is not supposed to contain a leading backslash,
// but sometimes it does. See tickets PHP-50731 and HHVM-1840.
if ($class[0] !== '\\')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be correct: $class[0].$class[1]
or only $class[1] seems enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only a single character. The first backslash is an escape character in PHP.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, yes true, everything is correct then.

naderman added a commit that referenced this pull request Mar 29, 2014
[ticket/12314] Workaround HHVM SPL autoloader sometimes using leading ba...
@naderman naderman merged commit b7909ba into phpbb:develop-ascraeus Mar 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants