Title: Deprecated function with PHP 8.2 &amp; 8.3
Last modified: November 27, 2023

---

# Deprecated function with PHP 8.2 & 8.3

 *  Resolved [Robin Labadie](https://wordpress.org/support/users/robin-labadie/)
 * (@robin-labadie)
 * [2 years, 6 months ago](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:
 *     ```wp-block-code
       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:4494
       esc_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
   
       Plugin: og
       ```
   
 * 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
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdeprecated-function-with-php-8-2-8-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Marcin Pietrzak](https://wordpress.org/support/users/iworks/)
 * (@iworks)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/#post-17239550)
 * Thank you!
 * I will try to fix it.
 * [https://github.com/iworks/og/issues/13](https://github.com/iworks/og/issues/13)
 * Marcin
 *  Thread Starter [Robin Labadie](https://wordpress.org/support/users/robin-labadie/)
 * (@robin-labadie)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/#post-17239756)
 * Thanks [@iworks](https://wordpress.org/support/users/iworks/) 🙂
 * You have time as it’s only deprecated functions for now. But a quick fix would
   still be much appreciated for reasons you can imagine (warnings may be be worrying
   and may consume time checking if they’re important).
 * All the best
    -  This reply was modified 2 years, 6 months ago by [Robin Labadie](https://wordpress.org/support/users/robin-labadie/).
 *  Plugin Author [Marcin Pietrzak](https://wordpress.org/support/users/iworks/)
 * (@iworks)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/#post-17244593)
 * hi [@robin-labadie](https://wordpress.org/support/users/robin-labadie/)
 * Should be fixed, please update and re-test.
 * M
 *  Thread Starter [Robin Labadie](https://wordpress.org/support/users/robin-labadie/)
 * (@robin-labadie)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/#post-17246010)
 * Hello [@iworks](https://wordpress.org/support/users/iworks/)
 * I confirm this is all fixed!
 * Love your work and pro-active support on a very handy plugin over the years, 
   thank you!
    -  This reply was modified 2 years, 6 months ago by [Robin Labadie](https://wordpress.org/support/users/robin-labadie/).
 *  Plugin Author [Marcin Pietrzak](https://wordpress.org/support/users/iworks/)
 * (@iworks)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/#post-17246587)
 * Thank you for the feedback! [@robin-labadie](https://wordpress.org/support/users/robin-labadie/)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Deprecated function with PHP 8.2 & 8.3’ is closed to new replies.

 * ![](https://ps.w.org/og/assets/icon.svg?rev=3296789)
 * [OG — Better Share on Social Media](https://wordpress.org/plugins/og/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/og/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/og/)
 * [Active Topics](https://wordpress.org/support/plugin/og/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/og/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/og/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Marcin Pietrzak](https://wordpress.org/support/users/iworks/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/deprecated-function-with-php-8-2-8-3/#post-17246587)
 * Status: resolved