modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 528 forks source link

File TV PHP warnings from Smarty templates, PHP 8.0 #15792

Closed deJaya closed 8 months ago

deJaya commented 3 years ago

Bug report

Summary

Under PHP 8.0 a fresh MODX install with no extras will outputs warnings into the Manager Log

https://community.modx.com/t/manager-error-log-lots-of-smarty-errors/4302

Step to reproduce

Run MODX on PHP8.0 and observe Manager Error Log

Observed behavior

[2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Attempt to read property "value" on null [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Undefined array key "showCheckbox" [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Attempt to read property "value" on null [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Undefined array key "showCheckbox" [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Attempt to read property "value" on null [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Undefined array key "showCheckbox" [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Attempt to read property "value" on null [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Undefined array key "showCheckbox" [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Attempt to read property "value" on null [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Undefined array key "showCheckbox" [2021-08-12 13:25:21] (ERROR @ /path/core/cache/mgr/smarty/762a9aeb2fd288c8987ceb503f42c3f412fb399e_0.file.tvs.tpl.php : 64) PHP warning: Attempt to read property "value" on null

Expected behavior

No warnings

Related issue(s)/PR(s)

Environment

MODX 2.8.3 PHP8.0

Mark-H commented 3 years ago

Changing your error_reporting server configuration to not trigger warnings can help hide them, but the root cause should still be addressed.

rthrash commented 3 years ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/manager-error-log-lots-of-smarty-errors/4302/10

Ibochkarev commented 2 years ago

Related https://github.com/smarty-php/smarty/releases/tag/v2.6.32

rthrash commented 2 years ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/errors-in-modx2-8-4-php8-in-the-error-log-inside-the-cms/5299/3

rthrash commented 1 year ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/formit-with-php8/6005/11

rthrash commented 1 year ago

This issue has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/multiple-errors-generated-when-updating-resource-or-visiting-dashboard/6289/2

rthrash commented 8 months ago

This was included in the 2.8.6 release when Mat's PR was merged.