Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Undefined index: expires" error when installing on site upgraded from Craft 2 #75

Closed
rsanchez opened this issue Jan 8, 2020 · 0 comments · Fixed by #76
Closed

"Undefined index: expires" error when installing on site upgraded from Craft 2 #75

rsanchez opened this issue Jan 8, 2020 · 0 comments · Fixed by #76

Comments

@rsanchez
Copy link
Contributor

rsanchez commented Jan 8, 2020

Encountered in the midst of an upgrade from Craft 2:

$ ./craft install/plugin aws-s3
*** installing aws-s3
Exception: Undefined index: expires (<redacted>/ew-craftcms/vendor/craftcms/aws-s3/src/migrations/Install.php:72)
#0 <redacted>/ew-craftcms/vendor/craftcms/aws-s3/src/migrations/Install.php(72): yii\base\ErrorHandler->handleError(8, 'Undefined index...', '/Users/robsanch...', 72, Array)
#1 <redacted>/ew-craftcms/vendor/craftcms/aws-s3/src/migrations/Install.php(33): craft\awss3\migrations\Install->_convertVolumes()
#2 <redacted>/ew-craftcms/vendor/craftcms/cms/src/db/Migration.php(58): craft\awss3\migrations\Install->safeUp()
#3 <redacted>/ew-craftcms/vendor/craftcms/cms/src/db/MigrationManager.php(239): craft\db\Migration->up(true)
#4 <redacted>/ew-craftcms/vendor/craftcms/cms/src/base/Plugin.php(155): craft\db\MigrationManager->migrateUp(Object(craft\awss3\migrations\Install))
#5 <redacted>/ew-craftcms/vendor/craftcms/cms/src/services/Plugins.php(520): craft\base\Plugin->install()
#6 <redacted>/ew-craftcms/vendor/craftcms/cms/src/console/controllers/InstallController.php(195): craft\services\Plugins->installPlugin('aws-s3')
#7 [internal function]: craft\console\controllers\InstallController->actionPlugin('aws-s3')
#8 <redacted>/ew-craftcms/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 <redacted>/ew-craftcms/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 <redacted>/ew-craftcms/vendor/yiisoft/yii2/console/Controller.php(164): yii\base\Controller->runAction('plugin', Array)
#11 <redacted>/ew-craftcms/vendor/craftcms/cms/src/console/Controller.php(199): yii\console\Controller->runAction('plugin', Array)
#12 <redacted>/ew-craftcms/vendor/yiisoft/yii2/base/Module.php(528): craft\console\Controller->runAction('plugin', Array)
#13 <redacted>/ew-craftcms/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('install/plugin', Array)
#14 <redacted>/ew-craftcms/vendor/craftcms/cms/src/console/Application.php(93): yii\console\Application->runAction('install/plugin', Array)
#15 <redacted>/ew-craftcms/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('install/plugin', Array)
#16 <redacted>/ew-craftcms/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(craft\console\Request))
#17 <redacted>/ew-craftcms/craft(22): yii\base\Application->run()
#18 {main}

It seems that there are some instances where the expires property is not present in the configuration array. The solution would be to check whether expires prop exist before using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant