Calling a non-static method statically
-
Since updating to PHP 8.0, I’m getting the following error:
PHP message: PHP Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, non-static method PMProRH_Field::saveFile() cannot be called statically in /www/austa_486/public/wp-content/plugins/pmpro-register-helper/pmpro-register-helper.php:937
I’ve taken a look at pmpro-register-helper.php line 937, which contains the following:
if(!empty($field->save_function)) call_user_func($field->save_function, $user_id, $field->name, $_POST[$field->name]);
And then at class.field.php:
elseif($this->type == "file") { //use the file save function $this->save_function = array("PMProRH_Field", "saveFile"); }
Any thoughts?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Calling a non-static method statically’ is closed to new replies.