Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:non7top:php53_contos7
php
php-5.3.3-extrglob.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php-5.3.3-extrglob.patch of Package php
http://svn.php.net/viewvc?view=revision&revision=305570 https://bugzilla.redhat.com/show_bug.cgi?id=655118 --- php-5.3.3/ext/standard/array.c.extrglob +++ php-5.3.3/ext/standard/array.c @@ -1389,10 +1389,10 @@ PHP_FUNCTION(extract) case EXTR_OVERWRITE: /* GLOBALS protection */ - if (var_exists && var_name_len == sizeof("GLOBALS") && !strcmp(var_name, "GLOBALS")) { + if (var_exists && var_name_len == sizeof("GLOBALS")-1 && !strcmp(var_name, "GLOBALS")) { break; } - if (var_exists && var_name_len == sizeof("this") && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) { + if (var_exists && var_name_len == sizeof("this")-1 && !strcmp(var_name, "this") && EG(scope) && EG(scope)->name_length != 0) { break; } ZVAL_STRINGL(&final_name, var_name, var_name_len, 1); --- php-5.3.3/ext/standard/tests/array/extract_safety.phpt.extrglob +++ php-5.3.3/ext/standard/tests/array/extract_safety.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test extract() for overwrite of GLOBALS +--FILE-- +<?php +$str = "John"; +debug_zval_dump($GLOBALS["str"]); + +/* Extracting Global Variables */ +$splat = array("foo" => "bar"); +var_dump(extract(array("GLOBALS" => $splat, EXTR_OVERWRITE))); + +unset ($splat); + +debug_zval_dump($GLOBALS["str"]); + +echo "\nDone"; +?> + +--EXPECTF-- +string(4) "John" refcount(2) +int(0) +string(4) "John" refcount(2) + +Done \ No newline at end of file
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor