Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get logs errors - PHP Deprecated: class-oembed.php #46

Open
panchenkoprog opened this issue Dec 29, 2020 · 0 comments
Open

Get logs errors - PHP Deprecated: class-oembed.php #46

panchenkoprog opened this issue Dec 29, 2020 · 0 comments

Comments

@panchenkoprog
Copy link

Hi.
I get errors in my logs:
PHP Deprecated: class-oembed.php is deprecated since version 5.3.0! Use wp-includes/class-wp-oembed.php instead. in /home/boatexd/public_html/wp-includes/functions.php on line 5049

I looked at your plugin code and saw that you are using the legacy class connection in two files:
\wp-content\plugins\schema\includes\extensions\video-object.php
\wp-content\plugins\schema\includes\extensions\audio-object.php

this is the require_once( ABSPATH . WPINC . '/class-oembed.php' );

fix require_once( ABSPATH . WPINC . '/class-wp-oembed.php' );

And everything will be all right!

Also i get warnings like this in the logs:
[29-Dec-2020 11:39:56 UTC] PHP Notice: Trying to access array offset on value of type null in /public_html/wp-content/plugins/schema/includes/extensions/comment.php on line 30
[29-Dec-2020 11:39:56 UTC] PHP Notice: Trying to access array offset on value of type null in /public_html/wp-content/plugins/schema/includes/extensions/comment.php on line 57

My temporary solution is:
$schema_type = !empty($schema["@type"]) ? $schema["@type"] : '';

But I think that you can solve this problem correctly and more gracefully.

Let me know about your decision.
Thanks in advance.
Sincerely, Aleksandr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant