You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[think\exception\ThrowableError]
Type error: implode(): Argument #2 ($array) must be of type ?array, string given
Exception trace:
() at D:\www\cdirs\master\vendor\topthink\think-migration\phinx\src\Phinx\Util\Util.php:110
implode() at D:\www\cdirs\master\vendor\topthink\think-migration\phinx\src\Phinx\Util\Util.php:110
Phinx\Util\Util::mapClassNameToFileName() at D:\www\cdirs\master\vendor\topthink\think-migration\src\command\migrate\Create.php:65
think\migration\command\migrate\Create->execute() at D:\www\cdirs\master\thinkphp\library\think\console\Command.php:175
think\console\Command->run() at D:\www\cdirs\master\thinkphp\library\think\Console.php:675
think\Console->doRunCommand() at D:\www\cdirs\master\thinkphp\library\think\Console.php:261
think\Console->doRun() at D:\www\cdirs\master\thinkphp\library\think\Console.php:198
think\Console->run() at D:\www\cdirs\master\thinkphp\library\think\Console.php:115
think\Console::init() at D:\www\cdirs\master\think:20
"topthink/think-migration": "2.0.3"
public static function mapClassNameToFileName($className)
{
$arr = preg_split('/(?=[A-Z])/', $className);
unset($arr[0]); // remove the first element ('')
$fileName = static::getCurrentTimestamp() . '' . strtolower(implode( $arr,'')) . '.php';
return $fileName;
}
Change
public static function mapClassNameToFileName($className)
{
$arr = preg_split('/(?=[A-Z])/', $className);
unset($arr[0]); // remove the first element ('')
$fileName = static::getCurrentTimestamp() . '' . strtolower(implode( '',$arr)) . '.php';
return $fileName;
}
The text was updated successfully, but these errors were encountered:
D:\www\cdirs\master>php think migrate:create Users
[think\exception\ThrowableError]
Type error: implode(): Argument #2 ($array) must be of type ?array, string given
Exception trace:
() at D:\www\cdirs\master\vendor\topthink\think-migration\phinx\src\Phinx\Util\Util.php:110
implode() at D:\www\cdirs\master\vendor\topthink\think-migration\phinx\src\Phinx\Util\Util.php:110
Phinx\Util\Util::mapClassNameToFileName() at D:\www\cdirs\master\vendor\topthink\think-migration\src\command\migrate\Create.php:65
think\migration\command\migrate\Create->execute() at D:\www\cdirs\master\thinkphp\library\think\console\Command.php:175
think\console\Command->run() at D:\www\cdirs\master\thinkphp\library\think\Console.php:675
think\Console->doRunCommand() at D:\www\cdirs\master\thinkphp\library\think\Console.php:261
think\Console->doRun() at D:\www\cdirs\master\thinkphp\library\think\Console.php:198
think\Console->run() at D:\www\cdirs\master\thinkphp\library\think\Console.php:115
think\Console::init() at D:\www\cdirs\master\think:20
"topthink/think-migration": "2.0.3"
public static function mapClassNameToFileName($className)
{
$arr = preg_split('/(?=[A-Z])/', $className);
unset($arr[0]); // remove the first element ('')
$fileName = static::getCurrentTimestamp() . '' . strtolower(implode( $arr,'')) . '.php';
return $fileName;
}
Change
public static function mapClassNameToFileName($className)
{
$arr = preg_split('/(?=[A-Z])/', $className);
unset($arr[0]); // remove the first element ('')
$fileName = static::getCurrentTimestamp() . '' . strtolower(implode( '',$arr)) . '.php';
return $fileName;
}
The text was updated successfully, but these errors were encountered: