Title: Warning: Illegal string offset &#039;theme_advanced_font_sizes&#039;
Last modified: August 21, 2016

---

# Warning: Illegal string offset 'theme_advanced_font_sizes'

 *  Resolved [blizcreak](https://wordpress.org/support/users/blizcreak/)
 * (@blizcreak)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/)
 * Getting this warning message when running Ultimate TinyMCE 5.2 on WordPress 3.8.1
   with PHP 5.4
 * I suspect that it is an incompatibility with PHP 5.4
 * The full warnings are:
 * Warning: Illegal string offset ‘theme_advanced_font_sizes’ in /home/virtualw/
   public_html/wordpress/wp-content/plugins/ultimate-tinymce/admin_functions.php
   on line 40
 * Warning: Illegal string offset ‘plugin_insertdate_dateFormat’ in /home/virtualw/
   public_html/wordpress/wp-content/plugins/ultimate-tinymce/admin_functions.php
   on line 41
 * Warning: Illegal string offset ‘plugin_insertdate_timeFormat’ in /home/virtualw/
   public_html/wordpress/wp-content/plugins/ultimate-tinymce/admin_functions.php
   on line 42
 * Warning: Illegal string offset ‘wordpress_adv_hidden’ in /home/virtualw/public_html/
   wordpress/wp-content/plugins/ultimate-tinymce/admin_functions.php on line 44
 * Warning: Illegal string offset ‘content_css’ in /home/virtualw/public_html/wordpress/
   wp-content/plugins/ultimate-tinymce/options_functions.php on line 1065
 * Hope you can fix, as I had to disable the plugin 🙁
 * Thanks
 * Noel
 * [https://wordpress.org/plugins/ultimate-tinymce/](https://wordpress.org/plugins/ultimate-tinymce/)

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

 *  Thread Starter [blizcreak](https://wordpress.org/support/users/blizcreak/)
 * (@blizcreak)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4686832)
 * Adding the line 39
 *     ```
       $initArray = array();
       ```
   
 * to admin_functions.php seems to do the trick.
 * Noel
 *  Plugin Author [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4686835)
 * Hi Noel,
    Yes, it’s because of php 5.4.
 * Your solution may have some adverse affects… because you are basically erasing
   anything that’s being passed into the function argument by redeclaring the variable
   as an empty array.
 * Instead, we should first check if the variable is empty.. and then add our items.
 * Replacing the entire function (and filter) with this one:
    [http://pastebin.com/jxukNy7c](http://pastebin.com/jxukNy7c)
 * .. should resolved the issue on a more localized approach.
 *  Thread Starter [blizcreak](https://wordpress.org/support/users/blizcreak/)
 * (@blizcreak)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4686839)
 * Thanks Josh,
 * Just tried that, but it doesn’t work – gives the same errors, as it still has
   the problem that
 *     ```
       if(empty($initArray['theme_advanced_font_sizes'])) {
       ```
   
 * expects $initArray to be an array when it is, in fact, a string with the value
   string(16) “nice_mce_options”
 * So, either we need to feed an actual array into the function, or we need to redefine
   $initArray as an array as the first line inside the function.
 * Noel
 *  Plugin Author [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4686843)
 * Okay, thanks for trying.
 * $initArray is an array. Here is a var_dump of my $initArray variable before it
   is modified:
    [http://pastebin.com/SK7Q4Agu](http://pastebin.com/SK7Q4Agu)
 * You can see it does not contain a [‘theme_advanced_font_sizes’] key.
 * Perhaps instead of checking if is empty.. we should check if exists.
 * I have to step out for a meeting. I’ll be back in about an hour. I’ll set up 
   php 5.4 on my test server when I get back home so I can replicate the warnings.
 * From there… I should be able to provide a better solution.
 * Thank you.. VERY much… for your time!
 *  Plugin Author [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687032)
 * Sorry.. got overwhelmed.
 * I’ll address this tomorrow. I just wanted to post an update and let you know 
   I haven’t forgotten.
 * Thanks again!
 *  Thread Starter [blizcreak](https://wordpress.org/support/users/blizcreak/)
 * (@blizcreak)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687054)
 * Any progress, Josh?
 * Noel
 *  Plugin Author [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687055)
 * Ummmm… no… I forgot.
    Isn’t that ironic??
 * I’m checking it out on my local install now. I, just tonight, updated my xampp
   to PHP 5.5.9… to ensure everything is running properly on the new converted WP
   Edit plugin.
 * Let me check it out and I’ll be right back.
 * EDIT:
    I’m not seeing the notices. Where do you see them?
 *  Plugin Author [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687067)
 * Well..
 * The life of Ultimate Tinymce is drawing to an end.
 * With the udpate of WordPress to version 3.9 (expected April 15th).. this plugin
   will no longer function on newer versions of WP.
 * BUT WAIT… there is good news 😉
 * Here is a link to the successor of Ultimate Tinymce:
    [http://wordpress.org/plugins/wp-edit/](http://wordpress.org/plugins/wp-edit/)
 * Welcome to the wonderful world of “WP Edit”.
 * Most of the same great options as Ultimate Tinymce.. coated with a generous serving
   of awesome-sauce!
 * Don’t install it until WP 3.9.. as it will break your site.
 * But I’m confident the warnings you are seeing will be a thing of the past.
 * Again.. thank you very much for you time.
 *  Thread Starter [blizcreak](https://wordpress.org/support/users/blizcreak/)
 * (@blizcreak)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687069)
 * Nothing is as constant as change.
 * Thanks so much for taking the effort to build and maintain Ultimate TM for all
   this time. I know how much work that can be.
 * Best wishes, Josh
 *  Plugin Author [Josh](https://wordpress.org/support/users/josh401/)
 * (@josh401)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687070)
 * Sheesh… isn’t that the truth!
 * Thank you for the very kind words.
 * I hope to see you around the new “WP Edit” community in a couple weeks 🙂

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

The topic ‘Warning: Illegal string offset 'theme_advanced_font_sizes'’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ultimate-tinymce.svg)
 * [Ultimate TinyMCE](https://wordpress.org/plugins/ultimate-tinymce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-tinymce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-tinymce/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-tinymce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-tinymce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-tinymce/reviews/)

## Tags

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

 * 10 replies
 * 2 participants
 * Last reply from: [Josh](https://wordpress.org/support/users/josh401/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-theme_advanced_font_sizes/#post-4687070)
 * Status: resolved