Title: Error code appearing
Last modified: August 22, 2016

---

# Error code appearing

 *  Resolved [randaloulton](https://wordpress.org/support/users/randaloulton/)
 * (@randaloulton)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-code-appearing/)
 * Under WordPress 4.0 with Genesis pages on which you put the shortcode, have this
   appearing on top of them:
 * Warning: Illegal string offset ‘list_only’ in /home/airfr513/public_html/hotairfrying.
   com/wp-content/plugins/summary-child-pages/summary-child-pages.php on line 76
 * Warning: Illegal string offset ‘id’ in /home/airfr513/public_html/hotairfrying.
   com/wp-content/plugins/summary-child-pages/summary-child-pages.php on line 83
 * [https://wordpress.org/plugins/summary-child-pages/](https://wordpress.org/plugins/summary-child-pages/)

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

 *  Thread Starter [randaloulton](https://wordpress.org/support/users/randaloulton/)
 * (@randaloulton)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-code-appearing/#post-5407127)
 * Hi there, the issue was… the plugin was actually fully working and continued 
   to beautifully display the child summaries…
 * but, that error code was appearing at the top of the page.
 * I solved the problem by editing the plugin, and just inserting this
 * ini_set( ‘display_errors’, ‘false’ );
 * after the //commented out instructions, just before the plugin code actually 
   got going, i.e.
 * //[summary-child-pages]
    //[summary-child-pages id=parent_id] //[summary-child-
   pages list_only=”1″] = no images, excerpt and read more //start added ini_set(‘
   display_errors’, ‘false’ ); //end added
 * For my money, this really is the best child summary plugin, so I hope it keeps
   on going strong for many moons yet.
 * Cheers.
 *  [redearthit](https://wordpress.org/support/users/redearthit/)
 * (@redearthit)
 * [11 years ago](https://wordpress.org/support/topic/error-code-appearing/#post-5407387)
 * Re-posting from my plugin review – here is an alternative option to fix this 
   error:
 * Great plugin, but is broken under PHP 5.4+ as the plugin attempts to pass a string
   in as an array (previous PHP versions were more forgiving and ignored the type
   error).
 * If you’re getting the “Warning: Illegal string offset ‘list_only’…” error, a 
   quick and dirty fix is to manually edit the plugin and insert the following code
   line into summary-child-pages.php on line 56 (inside the summary_child_pages 
   function, right before the `$list_only = $atts['list_only'];` line):
 *     ```
       /* ---------------------------------------------------*/
         /* Version v1.0.0: Patch for error under PHP 5.4+ to   */
         /*  address the "Warning: Illegal string offset        */
         /* 'list_only'" issue. An array (not a string) is      */
         /* expected, so check & convert $atts string to array. */
         /* ----------------------------------------------------*/
         if (!is_array($atts)) {$atts=explode(',',$atts,0);}
         /* ----------------------------------------------------*/
       ```
   
 * This checks to see if $atts is not an array, and converts it to one if so. If
   anyone has a better solution feel free to post it 🙂
 * To the developer: Thanks for making such a useful little plugin, and if possible
   could you please fix this in the next update so it works properly with PHP 5.4
   +? Thanks!

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

The topic ‘Error code appearing’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/summary-child-pages.svg)
 * [Summary of Child Pages](https://wordpress.org/plugins/summary-child-pages/)
 * [Support Threads](https://wordpress.org/support/plugin/summary-child-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/summary-child-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/summary-child-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/summary-child-pages/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [redearthit](https://wordpress.org/support/users/redearthit/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/error-code-appearing/#post-5407387)
 * Status: resolved