Deprecated: Creation of dynamic property H5P_Plugin_Admin

Forums: 

Hello,

I keep having problems with my WordPress caused by the 500 error in Elementor. When I thought I had solved the problem, this popped up on my webisite:

Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /hosting/www/WEBSITE.com/public/wp-includes/formatting.php on line 4494 Deprecated: Creation of dynamic property H5P_Plugin_Admin::$privacy is deprecated in /hosting/www/WEBSITE.com/public/wp-content/plugins/h5p/admin/class-h5p-plugin-admin.php on line 63 Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /hosting/www/WEBSITE.com/public/wp-content/plugins/h5p/admin/class-h5p-plugin-admin.php on line 547

(*Note: I replaced my website's name as it is not finished).

I then checked the location of this problem, and I found the following:

Could someone please help me? I do not know what is wrong with my website. 

Thank you very much in advance. 

 

I attach the screencapture of the code.

otacke's picture

Hi!

These are just deprecation messages, hinting that the respective functions will stop working the way they used to in PHP at some point in the future. Nothing is broken. If the messages are put on screen (not only in the PHP log), you should change your PHP error_reporting and/or display_errors setting.

Best,

Oliver 

Hello!

Thank you very much for your reply. Can't these lead to negative consequences in the future, though?

A few days ago, while I was working with Elementor, error 500 popped up. Could that be related to this H5P thing?

Best,

 

Adrienne

 

otacke's picture

If not changed, using deprecated functions will ultimately fail, yes, because at some point they will not be available in newer versions of PHP or work differently. The H5P core team will surely change the code before that happens.

Deprecated functions will lead to a deprecation warning, but otherwise work normally. So no, I doubt that they were responsible for the 500 error code.

You will need to check your server's PHP error log for the cause.

Best,

Oliver 

Thank you very much for your help, Oliver! I really appreciate it. 

Best,

 

Adrienne