Faster Image Insert
[resolved] Slight code improvement to get rid of NOTICE (4 posts)

  1. David L
    Posted 4 years ago #

    Great plugin! It improves significantly productivity.

    There is a PHP NOTICE (NOTICE: wp-admin/includes/template.php:854 - Trying to get property of non-object) to get rid of related to this code:

    $ptypes = explode(",",$ptype);
       foreach ($ptypes as $type) add_meta_box('fastinsert', 'Faster Insert', 'fast_insert_form', $type, 'normal', 'high');

    if there is not custom type then $ptypes is still an array with one key attached to an empty string. Therefore it still goes in the loop and executes add_meta_box function with $type being NULL, hence the NOTICE.

    You could check if $ptype is false and not execute the code above if it is.



  2. George Stephanis
    Code Monkey
    Posted 3 years ago #

    I just submitted a patch for this to the developer -- http://plugins.trac.wordpress.org/ticket/1593

  3. David Frank
    Plugin Author

    Posted 3 years ago #

    should be fixed in 2.4.0, finally. Thanks George.

  4. David L
    Posted 3 years ago #

    Great! Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Faster Image Insert
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.