Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/EvalFile_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@
* Evaluate a provided file.
*
* @param string $file Filepath to execute, or - for STDIN.
* @param mixed $args Array of positional arguments to pass to the file.
* @param mixed $positional_args Array of positional arguments to pass to the file.
* @param bool $use_include Process the provided file via include instead of evaluating its contents.
*/
private static function execute_eval( $file, $args, $use_include ) {
private static function execute_eval( $file, $positional_args, $use_include ) {
global $args;
$args = $positional_args;

Check failure on line 71 in src/EvalFile_Command.php

View workflow job for this annotation

GitHub Actions / code-quality / PHPCS

Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$args".
unset( $positional_args );

if ( '-' === $file ) {
eval( '?>' . file_get_contents( 'php://stdin' ) );
} elseif ( $use_include ) {
Expand Down
Loading