Skip to content
Merged
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
9 changes: 7 additions & 2 deletions src/EvalFile_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,15 @@ public function __invoke( $args, $assoc_args ) {
* 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;
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
$args = $positional_args;
unset( $positional_args );

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