Skip to content

Instantly share code, notes, and snippets.

@nikic
Created December 2, 2020 15:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikic/9fd95866f9811b349b947f63214ad7a9 to your computer and use it in GitHub Desktop.
Save nikic/9fd95866f9811b349b947f63214ad7a9 to your computer and use it in GitHub Desktop.
psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php:54
global $GLOBALS;
psy/psysh/src/Command/ListCommand/GlobalVariableEnumerator.php:56
$names = \array_keys($GLOBALS);
jackalope/jackalope/tests/Jackalope/TestCase.php:27
foreach ($GLOBALS as $cfgKey => $value) {
if ('phpcr.' === substr($cfgKey, 0, 6)) {
$this->config[substr($cfgKey, 6)] = $value;
}
}
sebastian/global-state/src/Restorer.php:50
foreach (\array_keys($GLOBALS) as $key) {
if ($key !== 'GLOBALS' &&
!\in_array($key, $superGlobalArrays) &&
!$snapshot->excludeList()->isGlobalVariableExcluded($key)) {
if (\array_key_exists($key, $globalVariables)) {
$GLOBALS[$key] = $globalVariables[$key];
} else {
unset($GLOBALS[$key]);
}
}
}
sebastian/global-state/src/Snapshot.php:252
foreach (\array_keys($GLOBALS) as $key) {
if ($key !== 'GLOBALS' &&
!\in_array($key, $superGlobalArrays) &&
$this->canBeSerialized($GLOBALS[$key]) &&
!$this->excludeList->isGlobalVariableExcluded($key)) {
/* @noinspection UnserializeExploitsInspection */
$this->globalVariables[$key] = \unserialize(\serialize($GLOBALS[$key]));
}
}
acquia/blt/tests/phpunit/src/BufferedConsoleOutput.php:39
if (!array_key_exists('blt_phpunit_buffer_output', $GLOBALS)) {
$GLOBALS['blt_phpunit_buffer_output'] = '';
}
drupal/core/tests/Drupal/KernelTests/KernelTestBaseTest.php:74
$this->assertArrayHasKey('destroy-me', $GLOBALS);
drupal/core/tests/Drupal/KernelTests/KernelTestBaseTest.php:103
$this->assertArrayNotHasKey('destroy-me', $GLOBALS);
drupal/core/tests/Drupal/KernelTests/KernelTestBaseTest.php:207
$this->assertArrayNotHasKey('theme', $GLOBALS);
wp-cli/export-command/src/WP_Export_Query.php:127
$previous_global_post = Utils\get_flag_value( $GLOBALS, 'post' );
phpseclib/phpseclib/phpseclib/Crypt/Random.php:100
$v = (isset($_SERVER) ? self::safe_serialize($_SERVER) : '') .
(isset($_POST) ? self::safe_serialize($_POST) : '') .
(isset($_GET) ? self::safe_serialize($_GET) : '') .
(isset($_COOKIE) ? self::safe_serialize($_COOKIE) : '') .
self::safe_serialize($GLOBALS) .
self::safe_serialize($_SESSION) .
self::safe_serialize($_OLD_SESSION);
zendframework/zend-test/src/PHPUnit/Controller/AbstractControllerTestCase.php:338
if (array_key_exists('_SESSION', $GLOBALS)) {
$_SESSION = [];
}
craftcms/cms/src/base/LogTargetTrait.php:86
$context = ArrayHelper::filter($GLOBALS, $this->logVars);
jetbrains/phpstorm-stubs/superglobals/_superglobals.php:10
$GLOBALS = array();
yiisoft/yii2/log/Target.php:172
$context = ArrayHelper::filter($GLOBALS, $this->logVars);
yiisoft/yii/framework/logging/CLogFilter.php:131
$value=$GLOBALS;
helhum/config-loader/src/Processor/Placeholder/GlobalsPlaceholder.php:32
Config::getValue($GLOBALS, $accessor);
helhum/config-loader/src/Processor/Placeholder/GlobalsPlaceholder.php:42
return Config::getValue($GLOBALS, $accessor);
doctrine/orm/bin/doctrine-pear.php:26
foreach ($GLOBALS as $helperSetCandidate) {
if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) {
$helperSet = $helperSetCandidate;
break;
}
}
doctrine/orm/bin/doctrine.php:46
foreach ($GLOBALS as $helperSetCandidate) {
if ($helperSetCandidate instanceof HelperSet) {
$helperSet = $helperSetCandidate;
break;
}
}
doctrine/dbal/bin/doctrine-dbal.php:51
foreach ($GLOBALS as $candidate) {
if ($candidate instanceof HelperSet) {
$helperSetOrConnectionProvider = $candidate;
break;
}
}
hirak/prestissimo/src/Plugin.php:75
if (array_key_exists('argv', $GLOBALS)) {
if (in_array('help', $GLOBALS['argv'])) {
return $this->disable();
}
foreach ($GLOBALS['argv'] as $arg) {
switch ($arg) {
case 'create-project':
case 'update':
case 'outdated':
case 'require':
$this->prefetchComposerRepositories();
break 2;
case 'install':
if (file_exists('composer.json') && !file_exists('composer.lock')) {
$this->prefetchComposerRepositories();
}
break 2;
}
}
}
phpunit/phpunit/src/Util/GlobalState.php:136
foreach (\array_keys($GLOBALS) as $key) {
if (!$GLOBALS[$key] instanceof \Closure && !\in_array($key, $excludeList, true)) {
$result .= \sprintf(
'$GLOBALS[\'%s\'] = %s;' . "\n",
$key,
self::exportVariable($GLOBALS[$key])
);
}
}
Found 23 issues.
NULL
NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment