-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
PHP Version
8.2.6
CodeIgniter4 Version
4.3.4
Shield Version
dev-develop
Shield OAuth Version?
dev-main
Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli
Database
MySQL 8.0.33
Did you add customize OAuth?
No
What happened?
D:\www\mobileproxy>php spark shield:model UserModel
CodeIgniter v4.3.5 Command Line Tool - Server Time: 2023-05-23 01:15:15 UTC+00:00
[ErrorException]
foreach() argument must be of type array|object, string given
at VENDORPATH\datamweb\shield-oauth\src\Libraries\Basic\ShieldOAuth.php:86
Backtrace:
1 VENDORPATH\datamweb\shield-oauth\src\Libraries\Basic\ShieldOAuth.php:86
CodeIgniter\Debug\Exceptions()->errorHandler(2, 'foreach() argument must be of type array|object, string given', 'D:\\www\\mobileproxy\\vendor\\datamweb\\shield-oauth\\src\\Libraries\\Basic\\ShieldOAuth.php', 86)
2 VENDORPATH\datamweb\shield-oauth\src\Libraries\Basic\ShieldOAuth.php:111
Datamweb\ShieldOAuth\Libraries\Basic\ShieldOAuth()->otherOAuth()
3 VENDORPATH\datamweb\shield-oauth\src\Views\Decorators\ShieldOAuth.php:21
Datamweb\ShieldOAuth\Libraries\Basic\ShieldOAuth()->makeOAuthButton('login')
4 SYSTEMPATH\View\ViewDecoratorTrait.php:31
Datamweb\ShieldOAuth\Views\Decorators\ShieldOAuth::decorate('<@php
declare(strict_types=1);
namespace {namespace};
use CodeIgniter\\Shield\\Models\\UserModel as ShieldUserModel;
class {class} extends ShieldUserModel
{
protected function initialize(): void
{
parent::initialize();
$this->allowedFields = [
...$this->allowedFields,
// \'first_name\',
];
}
}')
5 SYSTEMPATH\View\View.php:234
CodeIgniter\View\View()->decorateOutput('<@php
declare(strict_types=1);
namespace {namespace};
use CodeIgniter\\Shield\\Models\\UserModel as ShieldUserModel;
class {class} extends ShieldUserModel
{
protected function initialize(): void
{
parent::initialize();
$this->allowedFields = [
...$this->allowedFields,
// \'first_name\',
];
}
}')
6 SYSTEMPATH\Common.php:1184
CodeIgniter\View\View()->render('CodeIgniter\\Commands\\Generators\\Views\\usermodel.tpl.php', [...], true)
7 SYSTEMPATH\CLI\GeneratorTrait.php:274
view('CodeIgniter\\Commands\\Generators\\Views\\usermodel.tpl.php', [], [...])
8 SYSTEMPATH\CLI\GeneratorTrait.php:292
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->renderTemplate([])
9 SYSTEMPATH\CLI\GeneratorTrait.php:204
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->parseTemplate('App\\Models\\UserModel')
10 SYSTEMPATH\CLI\GeneratorTrait.php:302
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->prepare('App\\Models\\UserModel')
11 SYSTEMPATH\CLI\GeneratorTrait.php:115
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->buildContent('App\\Models\\UserModel')
12 SYSTEMPATH\CLI\GeneratorTrait.php:94
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->generateClass([...])
13 VENDORPATH\codeigniter4\shield\src\Commands\Generators\UserModelGenerator.php:77
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->execute([...])
14 SYSTEMPATH\CLI\Commands.php:65
CodeIgniter\Shield\Commands\Generators\UserModelGenerator()->run([...])
15 SYSTEMPATH\CLI\Console.php:37
CodeIgniter\CLI\Commands()->run('shield:model', [...])
16 ROOTPATH\spark:97
CodeIgniter\CLI\Console()->run()
Steps to Reproduce
Open CMD
Expected Output
php spark shield:model UserModel
Anything else?
No response
Metadata
Metadata
Assignees
Labels
No labels