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
Ho installato Yii2 e l'estione Edgar Messias firebird yii2, qundo cerco di esegiure gii model Generator mi da questo errore:
PHP Warning – yii\base\ErrorException
foreach() argument must be of type array|object, bool given
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\components\ActiveField.phpat line 77
68697071727374757677787980818283848586 * @param array $data auto complete data (array of callables or scalars)
@return $this the field object itself
*/
public function autoComplete($data)
{
$inputID = $this->getInputId();
ArrayHelper::setValue($this->inputOptions, 'list', "$inputID-list");
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\components\ActiveField.php at line 77– yii\base\ErrorHandler::handleError(2, 'foreach() argument must be of ty...', 'C:\xampp\htdocs\sgretail\vendor...', 77)
71727374757677787980818283 public function autoComplete($data)
{
$inputID = $this->getInputId();
ArrayHelper::setValue($this->inputOptions, 'list', "$inputID-list");
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\di\Container.php at line 419– ReflectionClass::newInstanceArgs([['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...]])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\di\Container.php at line 170– yii\di\Container::build('yii\gii\components\ActiveField', [], ['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\BaseYii.php at line 365– yii\di\Container::get('yii\gii\components\ActiveField', [], ['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\widgets\ActiveForm.php at line 331– yii\BaseYii::createObject(['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\generators\model\form.php at line 13– yii\widgets\ActiveForm::field(yii\gii\generators\model\Generator, 'tableName')
78910111213141516171819/** @var yii\widgets\ActiveForm $form /
/* @var yii\gii\generators\model\Generator $generator */
echo $form->field($generator, 'db');
echo $form->field($generator, 'useTablePrefix')->checkbox();
echo $form->field($generator, 'useSchemaName')->checkbox();
echo $form->field($generator, 'tableName')->textInput([
'autocomplete' => 'off',
'data' => [
'table-prefix' => $generator->getTablePrefix(),
'action' => Url::to(['default/action', 'id' => 'model', 'name' => 'GenerateClassName'])
]
]);
11. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 348– require('C:\xampp\htdocs\sgretail\vendor...')
12. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 258– yii\base\View::renderPhpFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'form' => yii\widgets\ActiveForm])
13. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\views\default\view.php at line 41– yii\base\View::renderFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'form' => yii\widgets\ActiveForm])
35363738394041424344454647 'hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'],
'errorOptions' => ['class' => 'invalid-feedback']
],
]); ?>
renderFile($generator->formView(), [
'generator' => $generator,
'form' => $form,
]) ?>
<?= $form->field($generator, 'template')
->sticky()
->hint('Please select which set of the templates should be used to generated the code.')
14. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 348– require('C:\xampp\htdocs\sgretail\vendor...')
15. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 258– yii\base\View::renderPhpFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'])
16. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 157– yii\base\View::renderFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'], yii\gii\controllers\DefaultController)
17. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\Controller.php at line 407– yii\base\View::render('view', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'], yii\gii\controllers\DefaultController)
18. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\controllers\DefaultController.php at line 72– yii\base\Controller::render('view', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'])
66676869707172737475767778 $params['files'] = $files;
$params['answers'] = $answers;
}
}
}
return $this->render('view', $params);
}
public function actionPreview($id, $file)
{
$generator = $this->loadGenerator($id);
if ($generator->validate()) {
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\InlineAction.php at line 57– call_user_func_array([yii\gii\controllers\DefaultController, 'actionView'], ['model'])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\Controller.php at line 178– yii\base\InlineAction::runWithParams(['r' => 'gii/default/view', 'id' => 'model'])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\Module.php at line 552– yii\base\Controller::runAction('view', ['r' => 'gii/default/view', 'id' => 'model'])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\web\Application.php at line 103– yii\base\Module::runAction('gii/default/view', ['r' => 'gii/default/view', 'id' => 'model'])
in C:\xampp\htdocs\sgretail\web\index.php at line 12– yii\base\Application::run()
6789101112
require DIR . '/../vendor/autoload.php';
require DIR . '/../vendor/yiisoft/yii2/Yii.php';
Ho installato Yii2 e l'estione Edgar Messias firebird yii2, qundo cerco di esegiure gii model Generator mi da questo errore:
PHP Warning – yii\base\ErrorException
foreach() argument must be of type array|object, bool given
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\components\ActiveField.phpat line 77
68697071727374757677787980818283848586 * @param array $data auto complete data (array of callables or scalars)
@return $this the field object itself
*/
public function autoComplete($data)
{
$inputID = $this->getInputId();
ArrayHelper::setValue($this->inputOptions, 'list', "$inputID-list");
$html = Html::beginTag('datalist', ['id' => "$inputID-list"]) . "\n";
foreach ($data as $item) {
$html .= Html::tag('option', $item) . "\n";
}
$html .= Html::endTag('datalist');
$this->parts['{list}'] = $html;
return $this;
}
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\components\ActiveField.php at line 77– yii\base\ErrorHandler::handleError(2, 'foreach() argument must be of ty...', 'C:\xampp\htdocs\sgretail\vendor...', 77)
71727374757677787980818283 public function autoComplete($data)
{
$inputID = $this->getInputId();
ArrayHelper::setValue($this->inputOptions, 'list', "$inputID-list");
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\components\ActiveField.php at line 46– yii\gii\components\ActiveField::autoComplete(false)
40414243444546474849505152 if (isset($hints[$this->attribute])) {
$this->hint($hints[$this->attribute]);
}
$autoCompleteData = $this->model->autoCompleteData();
if (isset($autoCompleteData[$this->attribute])) {
if (is_callable($autoCompleteData[$this->attribute])) {
$this->autoComplete(call_user_func($autoCompleteData[$this->attribute]));
} else {
$this->autoComplete($autoCompleteData[$this->attribute]);
}
} else {
$this->parts['{list}'] = '';
}
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\BaseObject.php at line 109– yii\gii\components\ActiveField::init()
yii\base\BaseObject::__construct(['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\di\Container.php at line 419– ReflectionClass::newInstanceArgs([['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...]])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\di\Container.php at line 170– yii\di\Container::build('yii\gii\components\ActiveField', [], ['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\BaseYii.php at line 365– yii\di\Container::get('yii\gii\components\ActiveField', [], ['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\widgets\ActiveForm.php at line 331– yii\BaseYii::createObject(['hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'], 'errorOptions' => ['class' => 'invalid-feedback'], 'model' => yii\gii\generators\model\Generator, 'attribute' => 'tableName', ...])
in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\generators\model\form.php at line 13– yii\widgets\ActiveForm::field(yii\gii\generators\model\Generator, 'tableName')
78910111213141516171819/** @var yii\widgets\ActiveForm $form /
/* @var yii\gii\generators\model\Generator $generator */
echo $form->field($generator, 'db');
echo $form->field($generator, 'useTablePrefix')->checkbox();
echo $form->field($generator, 'useSchemaName')->checkbox();
echo $form->field($generator, 'tableName')->textInput([
'autocomplete' => 'off',
'data' => [
'table-prefix' => $generator->getTablePrefix(),
'action' => Url::to(['default/action', 'id' => 'model', 'name' => 'GenerateClassName'])
]
]);
11. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 348– require('C:\xampp\htdocs\sgretail\vendor...')
12. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 258– yii\base\View::renderPhpFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'form' => yii\widgets\ActiveForm])
13. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\views\default\view.php at line 41– yii\base\View::renderFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'form' => yii\widgets\ActiveForm])
35363738394041424344454647 'hintOptions' => ['tag' => 'small', 'class' => 'form-text text-muted'],
'errorOptions' => ['class' => 'invalid-feedback']
],
]); ?>
renderFile($generator->formView(), [ 'generator' => $generator, 'form' => $form, ]) ?>
<?= $form->field($generator, 'template')
->sticky()
->hint('Please select which set of the templates should be used to generated the code.')
14. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 348– require('C:\xampp\htdocs\sgretail\vendor...')
15. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 258– yii\base\View::renderPhpFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'])
16. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\View.php at line 157– yii\base\View::renderFile('C:\xampp\htdocs\sgretail\vendor...', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'], yii\gii\controllers\DefaultController)
17. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2\base\Controller.php at line 407– yii\base\View::render('view', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'], yii\gii\controllers\DefaultController)
18. in C:\xampp\htdocs\sgretail\vendor\yiisoft\yii2-gii\src\controllers\DefaultController.php at line 72– yii\base\Controller::render('view', ['generator' => yii\gii\generators\model\Generator, 'id' => 'model'])
66676869707172737475767778 $params['files'] = $files;
$params['answers'] = $answers;
}
}
}
6789101112
require DIR . '/../vendor/autoload.php';
require DIR . '/../vendor/yiisoft/yii2/Yii.php';
$config = require DIR . '/../config/web.php';
(new yii\web\Application($config))->run();
$_GET = [
'r' => 'gii/default/view',
'id' => 'model',
];
$_COOKIE = [
'_csrf' => '4e004e15ec431ad0e2a3bf6a7a46933e8ca6c1b52125076dfd3e724deeddb999a:2:{i:0;s:5:"_csrf";i:1;s:32:"OBqcMlhnfTDwAJCnWQo-fS3ep9cehoH1";}',
];
Yii Framework/2.0.50
The text was updated successfully, but these errors were encountered: