mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-23 11:29:10 -04:00
ALPHA 3.0.2a
This commit is contained in:
8
vendor/psy/psysh/src/Command/SudoCommand.php
vendored
8
vendor/psy/psysh/src/Command/SudoCommand.php
vendored
@@ -103,13 +103,13 @@ HELP
|
||||
// special case for !!
|
||||
if ($code === '!!') {
|
||||
$history = $this->readline->listHistory();
|
||||
if (count($history) < 2) {
|
||||
if (\count($history) < 2) {
|
||||
throw new \InvalidArgumentException('No previous command to replay');
|
||||
}
|
||||
$code = $history[count($history) - 2];
|
||||
$code = $history[\count($history) - 2];
|
||||
}
|
||||
|
||||
if (strpos('<?', $code) === false) {
|
||||
if (\strpos('<?', $code) === false) {
|
||||
$code = '<?php ' . $code;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ HELP
|
||||
try {
|
||||
return $this->parser->parse($code);
|
||||
} catch (\PhpParser\Error $e) {
|
||||
if (strpos($e->getMessage(), 'unexpected EOF') === false) {
|
||||
if (\strpos($e->getMessage(), 'unexpected EOF') === false) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user