• Resolved blizcreak

    (@blizcreak)


    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://ww.wp.xz.cn/plugins/ultimate-tinymce/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter blizcreak

    (@blizcreak)

    Adding the line 39

    $initArray = array();

    to admin_functions.php seems to do the trick.

    Noel

    Plugin Author Josh

    (@josh401)

    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

    .. should resolved the issue on a more localized approach.

    Thread Starter blizcreak

    (@blizcreak)

    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

    (@josh401)

    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

    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

    (@josh401)

    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

    (@blizcreak)

    Any progress, Josh?

    Noel

    Plugin Author Josh

    (@josh401)

    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

    (@josh401)

    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://ww.wp.xz.cn/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

    (@blizcreak)

    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

    (@josh401)

    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.