mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
For rationale, see #6787 Extensions migrated in part 3: * ftp * gmp * iconv * opcache * shmop
42 lines
723 B
PHP
42 lines
723 B
PHP
--TEST--
|
|
Bug #75357 (segfault loading WordPress wp-admin)
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.optimization_level=-1
|
|
--EXTENSIONS--
|
|
opcache
|
|
--FILE--
|
|
<?php
|
|
|
|
function wp_slash( $value ) {
|
|
if ( is_array( $value ) ) {
|
|
foreach ( $value as $k => $v ) {
|
|
if ( is_array( $v ) ) {
|
|
$value[$k] = wp_slash( $v );
|
|
} else {
|
|
$value[$k] = addslashes( $v );
|
|
}
|
|
}
|
|
} else {
|
|
$value = addslashes( $value );
|
|
}
|
|
|
|
return $value;
|
|
}
|
|
|
|
function addslashes_gpc($gpc) {
|
|
return wp_slash($gpc);
|
|
}
|
|
|
|
var_dump(addslashes_gpc(array(array("test"))));
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
[0]=>
|
|
array(1) {
|
|
[0]=>
|
|
string(4) "test"
|
|
}
|
|
}
|