File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,15 @@ public function __invoke( $args, $assoc_args ) {
6363 * Evaluate a provided file.
6464 *
6565 * @param string $file Filepath to execute, or - for STDIN.
66- * @param mixed $args Array of positional arguments to pass to the file.
66+ * @param mixed $positional_args Array of positional arguments to pass to the file.
6767 * @param bool $use_include Process the provided file via include instead of evaluating its contents.
6868 */
69- private static function execute_eval ( $ file , $ args , $ use_include ) {
69+ private static function execute_eval ( $ file , $ positional_args , $ use_include ) {
70+ global $ args ;
71+ // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
72+ $ args = $ positional_args ;
73+ unset( $ positional_args );
74+
7075 if ( '- ' === $ file ) {
7176 eval ( '?> ' . file_get_contents ( 'php://stdin ' ) );
7277 } elseif ( $ use_include ) {
You can’t perform that action at this time.
0 commit comments