Title: Uninitialized string offset 0
Last modified: January 1, 2023

---

# Uninitialized string offset 0

 *  Resolved [lavinya](https://wordpress.org/support/users/lavinya/)
 * (@lavinya)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/)
 * Hello. Thanks for this plugin.
 * My system: ubuntu linux 22.04.1
   WordPress version: 6.1.1Rank Math SEO: 1.0.105Php:
   8.1.x
 * I am getting the following error in the error logs. AH01071: Got error PHP message:
   PHP Warning: Uninitialized string offset 0 in seo-by-rank-math/vendor/mythemeshop/
   wordpress-helpers/src/helpers/class-str.php on line 235
 * line 235 is here
   $ucwords .= preg_match( ‘/[\p{L}]/u’, $word[0] ) ? mb_strtoupper(
   $word[0], ‘UTF-8’ ) . mb_substr( $word, 1, mb_strlen( $word ), ‘UTF-8’ ) : $word;
 * Thanks in advance for your help.
 * NOTE: I also opened a thread here: [https://github.com/MyThemeShopTeam/wordpress-helpers/issues/32](https://github.com/MyThemeShopTeam/wordpress-helpers/issues/32)
    -  This topic was modified 3 years, 5 months ago by [lavinya](https://wordpress.org/support/users/lavinya/).

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

 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathteam/)
 * (@rankmathteam)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/#post-16334537)
 * Hello [@lavinya](https://wordpress.org/support/users/lavinya/),
 * Thank you for contacting the support, and sorry for any inconvenience that might
   have been caused due to that.
 * It seems to be working fine on our end.
 * Assuming you are using the latest version of all the plugins, themes, and WordPress(
   please update if not yet), it would seem like a conflict with one of the plugins
   or the theme you are using.
 * To determine that, please follow this troubleshooting guide:
   [https://rankmath.com/kb/check-plugin-conflicts/](https://rankmath.com/kb/check-plugin-conflicts/)
 * Only the site admin would know, and your users won’t be affected by this troubleshooting.
 * You can follow this video tutorial as well:
   [https://www.youtube.com/watch?v=FcIWRhcUP2c](https://www.youtube.com/watch?v=FcIWRhcUP2c)
 * Looking forward to helping you.
 *  Thread Starter [lavinya](https://wordpress.org/support/users/lavinya/)
 * (@lavinya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/#post-16664695)
 * Hello.
 * The problem persists. Unfortunately, there are thousands of people on the internet
   who have the same problem. Please create a fix. respects.
 * My system: ubuntu linux 22.04.2
   WordPress version: 6.2Rank Math SEO: 1.0.111Php:
   8.1.x
 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathteam/)
 * (@rankmathteam)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/#post-16665886)
 * Hello [@lavinya](https://wordpress.org/support/users/lavinya/),
 * This error usually occurs if there is a whitespace or special characters at the
   starting or ending of the SEO title. Please try checking for that on the affected
   page, and if it’s there, please remove that and update the page. After that, 
   the issue should be resolved.
 * Let us know how it goes. Looking forward to helping you.
 * Thank you.
 *  Thread Starter [lavinya](https://wordpress.org/support/users/lavinya/)
 * (@lavinya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/#post-16679040)
 * [@rankmathteam](https://wordpress.org/support/users/rankmathteam/) thanks for
   reply.
 * Forgive me.
 * However, there will/may be spaces or special characters in the page title or 
   page description section of course. This is natural. What matters is what the
   code will clean up.
 * The problem is this plugin not compatible with php 8.1 and 8.2: [https://github.com/MyThemeShopTeam/wordpress-helpers](https://github.com/MyThemeShopTeam/wordpress-helpers)
 * The change found here is incorrect. Must be checked. [https://github.com/MyThemeShopTeam/wordpress-helpers/commit/5f216fc5b8434a47eaaab48e490d5ea95441715e](https://github.com/MyThemeShopTeam/wordpress-helpers/commit/5f216fc5b8434a47eaaab48e490d5ea95441715e)
 * Regards, thank you for this beautiful free plugin. have a nice day.
    -  This reply was modified 3 years, 1 month ago by [lavinya](https://wordpress.org/support/users/lavinya/).
 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathteam/)
 * (@rankmathteam)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/#post-16690800)
 * Hello [@lavinya](https://wordpress.org/support/users/lavinya/),
 * Thank you so much for sharing this with us.
 * We will make sure to fix this in the next update.
 * For now, you can replace the following code line [https://github.com/rankmath/seo-by-rank-math/blob/master/vendor/mythemeshop/wordpress-helpers/src/helpers/class-str.php#L235](https://github.com/rankmath/seo-by-rank-math/blob/master/vendor/mythemeshop/wordpress-helpers/src/helpers/class-str.php#L235)
   with the code below:
   `if ( ! empty( $word[ 0 ] ) ) { $ucwords .= preg_match( '/[\
   p{L}]/u', $word[0] ) ? mb_strtoupper( $word[0], 'UTF-8' ) . mb_substr( $word,
   1, mb_strlen( $word ), 'UTF-8' ) : $word; }`
 * Hope that helps, and please do not hesitate to let us know if you need my assistance
   with anything else.

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

The topic ‘Uninitialized string offset 0’ is closed to new replies.

 * ![](https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330)
 * [Rank Math SEO – AI SEO Tools to Dominate SEO Rankings](https://wordpress.org/plugins/seo-by-rank-math/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/seo-by-rank-math/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/seo-by-rank-math/)
 * [Active Topics](https://wordpress.org/support/plugin/seo-by-rank-math/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seo-by-rank-math/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seo-by-rank-math/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [Rank Math Support](https://wordpress.org/support/users/rankmathteam/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/uninitialized-string-offset-0/#post-16690800)
 * Status: resolved