Skip to content

Commit

Permalink
PHP 8 compatibility: Fix passing null to string parameter parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
apphp committed Sep 24, 2024
1 parent 9d0b1ff commit 6cd267f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions framework/console/CConsoleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ protected function resolveRequest($args)
$params=array(); // unnamed parameters
foreach($args as $arg)
{
if (is_null($arg))
continue;

if(preg_match('/^--(\w+)(=(.*))?$/',$arg,$matches)) // an option
{
$name=$matches[1];
Expand Down

0 comments on commit 6cd267f

Please sign in to comment.