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
Warning: Undefined array key "publisher_categories" in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
--
Warning: Trying to access array offset on value of type null in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: foreach() argument must be of type array\|object, null given in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Undefined array key "publisher_items" in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Trying to access array offset on value of type null in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: foreach() argument must be of type array\|object, null given in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Undefined array key "publisher_files" in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Trying to access array offset on value of type null in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: foreach() argument must be of type array\|object, null given in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Undefined array key "publisher_meta" in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Trying to access array offset on value of type null in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: foreach() argument must be of type array\|object, null given in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Undefined array key "publisher_mimetypes" in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Trying to access array offset on value of type null in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: foreach() argument must be of type array\|object, null given in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Undefined array key "publisher_rating" in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: Trying to access array offset on value of type null in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
Warning: foreach() argument must be of type array\|object, null given in file /class/libraries/vendor/xoops/xmf/src/Database/Migrate.php line 216
After adding isset() check as below, the warnings are gone:
A table name specified in $modversion['tables'] does not have a corresponding table in the schema you are referencing.
This IS a bug in XMF, as this should have prompted an error, but there appears to also be something amiss in your module.
geekwright
changed the title
PHP 8.1 warnings in Migrate (Trying to access array offset on value of type null)
Inadequate or missing sanity/error checks in Migrate
Feb 23, 2022
If table was identified in $modversion['tables'] in
xoops_version.php, but did not exist in the database,
schema was not applied to the new table.
This is related to the errors mentioned in XOOPS#85
Also includes fixes for:
- schema errors for column default by MySQL function (i.e. CURRENT_TIMESTAMP)
- tweaks to generated schema file names for new module versioning
- minor docblock cleanups
In PHP 8.1 I'm getting errors:
After adding
isset()
check as below, the warnings are gone:The text was updated successfully, but these errors were encountered: