-
-
Notifications
You must be signed in to change notification settings - Fork 466
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
BUG: gc_possible_root #1970
Labels
Comments
Closed
@dreamsxin Please help |
I test branch development, cannot reproduce. PHP 7.1.32-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep 2 2019 13:28:17) ( NTS ) |
@dreamsxin Use |
Can test change zephir_get_global if (Z_TYPE_P(gv) == IS_ARRAY) {
ZVAL_COPY_VALUE(arr, gv);
zend_string_release(str);
return SUCCESS;
} To if (Z_TYPE_P(gv) == IS_ARRAY) {
ZVAL_DUP(arr, gv);
zend_hash_update(&EG(symbol_table), are, arr);
zend_string_release(str);
return SUCCESS;
} Link #1961 (comment) |
Looks like it is fixed in latest Zephir. // Zephir code
namespace Bug;
class Globals {
public function getUserAgent() {
return _SERVER["HTTP_USER_AGENT"];
}
} // manual.php
<?php
use Bug\Globals;
$_SERVER["HTTP_USER_AGENT"] = "Test";
$test = new Globals;
echo $test->getUserAgent() . PHP_EOL; Output:
Tested PHP versions:
Tested Zephir versions:
If there are bugs, we can follow up in separate issues. |
dreamsxin
pushed a commit
to dreamsxin/zephir
that referenced
this issue
Nov 6, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In PHP 7.1.32, This bug occurs.
In PHP 7.2.22, This bug does not occur.
zephir (0.12.9 ) git revision number: f345c4a
test/globals/server.zep
manual.php
output:
The text was updated successfully, but these errors were encountered: