-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
PHP7, array_push *RECURSION* #1140
Comments
First off thanks for helping making PHP7 support better :) |
minimal sample: public function addNamespace(string prefix, string baseDir)
{
if !isset this->prefixes[prefix] {
let this->prefixes[prefix] = [];
}
array_push(this->prefixes[prefix], baseDir);
} This is very tricky to fix, won't happen soon. |
Bad to hear, maybe it's related to fetching array. I had a problem with #1126 (comment) let handler = data["routeMap"][j][0],
varNames = data["routeMap"][j][1]; |
It is indeed related to array fetching.
causes the refcount of the new array to be 2
Here the array with refcount 2 is separated (since the refcount should actually be 1, I cannot quite think of a way to fix this without the ways described above, |
use your code (php7) when is start apache, has a PHP Warning PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/ice.so' - /usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/ice.so: undefined symbol: zend_std_call_user_call in Unknown on line 0 |
@andresgutierrez @ovr any idea to resolve this? |
@steffengy this is temporary fix for me, but I kept it open // initialize the namespace prefix array
if !isset this->prefixes[prefix] {
let this->prefixes[prefix] = [utf8_encode(baseDir)];
return this;
} |
@dreamsxin Could you please take a look |
Fixed in the 0.11.11 version. Feel free to open a new issue if the problem appears again. Thank you for contributing. |
I have psr-4 loader:
If I'm trying to add namespace:
Expected (works on PHP5):
On PHP7:
The text was updated successfully, but these errors were encountered: