Skip to content

Deprecated function with PHP 8.2 & 8.3 #13

@iworks

Description

@iworks

https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/

Hello,

I shall let you know that current version of your plugin uses at least one deprecated function in PHP 8.2 and 8.3.

Visiting plugins page (/wp-admin/plugins.php) with WP Query Monitor extension enabled, shows the following error:

Deprecated Message:

ltrim(): Passing null to parameter #1 ($string) of type string is deprecated

Location: wp-includes/formatting.php:4494 ltrim() wp-includes/formatting.php:4494esc_url() 
wp-content/plugins/og/includes/iworks/rate/rate.php:119
iworks_rate->add_donate_link()
wp-includes/class-wp-hook.php:324
apply_filters('plugin_action_links_og/og.php')
wp-admin/includes/class-wp-plugins-list-table.php:985
WP_Plugins_List_Table->single_row()
wp-admin/includes/class-wp-plugins-list-table.php:706
WP_Plugins_List_Table->display_rows()
wp-admin/includes/class-wp-list-table.php:1709
WP_List_Table->display_rows_or_placeholder()
wp-admin/includes/class-wp-list-table.php:1636
WP_List_Table->display()
wp-admin/plugins.php:796

In order to avoid getting such error, and to prepare for future PHP versions, it would be a great thing to adapt the code in order to fit newer PHP versions.

Best regards

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions