jn1 Posted October 24, 2023 Posted October 24, 2023 (edited) Hello, After updating to 1.5 I get "500 Server Error" when I try to save. "Front-Office Funktionen Startseiten-Texteditor v2.6.0 - von PrestaShop Ein Texteditor-Modul für Ihre Startseite" I am using PHP 8.0. The problem did not disappear when I get the latest bleeding edge. Debugger says: TypeError key_exists(): Argument #2 ($array) must be of type array, EditorialClass given in file modules/editorial/EditorialClass.php at line 80 public function copyFromPost() 76: { 77: /* Classical fields */ 78: foreach ($_POST as $key => $value) 79: { 80: if (key_exists($key, $this) && $key != 'id_'.$this->table) 81: $this->{$key} = $value; 82: } Thanks a lot Josef ps I am using now and it works. But if you see a problem let me know. Thanks. Josef Front-Office Funktionen HTML-Block v1.2.1 - von thirty bees Edited October 24, 2023 by jn1
0 the.rampage.rado Posted October 24, 2023 Posted October 24, 2023 6 hours ago, jn1 said: Hello, After updating to 1.5 I get "500 Server Error" when I try to save. "Front-Office Funktionen Startseiten-Texteditor v2.6.0 - von PrestaShop Ein Texteditor-Modul für Ihre Startseite" I am using PHP 8.0. The problem did not disappear when I get the latest bleeding edge. Debugger says: TypeError key_exists(): Argument #2 ($array) must be of type array, EditorialClass given in file modules/editorial/EditorialClass.php at line 80 public function copyFromPost() 76: { 77: /* Classical fields */ 78: foreach ($_POST as $key => $value) 79: { 80: if (key_exists($key, $this) && $key != 'id_'.$this->table) 81: $this->{$key} = $value; 82: } Thanks a lot Josef This module does not support php8. If you already rolled back to your backup set your php version to 7.4, update TB core to 7.4, install Collectlogs module and observe the warnings that this module will rise. Fix the all the issues that are generating during 7.4 and then BACKUP again and try an update to php8. 1
0 jn1 Posted October 24, 2023 Author Posted October 24, 2023 thanks. I switch to:😍 Front-Office Funktionen HTML-Block v1.2.1 - von thirty bees
0 datakick Posted October 24, 2023 Posted October 24, 2023 This is very common problem with a lot of older modules. When you see this error (on PHP8) or warning (on PHP7), then replace key_exists($key, $this) array_key_exists($key, $this) with property_exists($this, $key) The first two functions can be used with array only. If object is passed instead, older versions of PHP converted this object to array automatically (silently, or with warning). PHP8 do not do this automatic conversion, and fails instead.
Question
jn1
Hello,
After updating to 1.5 I get "500 Server Error" when I try to save.
"Front-Office Funktionen
Startseiten-Texteditor v2.6.0 - von PrestaShop
Ein Texteditor-Modul für Ihre Startseite"
I am using PHP 8.0.
The problem did not disappear when I get the latest bleeding edge.
Debugger says:
TypeError
key_exists(): Argument #2 ($array) must be of type array, EditorialClass given
Thanks a lot
Josef
ps
I am using now and it works. But if you see a problem let me know. Thanks. Josef
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now