Title: [Small bug fix] Error if page list is empty
Last modified: August 20, 2016

---

# [Small bug fix] Error if page list is empty

 *  Resolved [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/small-bugfix/)
 * Hiya,
 * Happy to found your plugin. I use it for sub-menu’s in the sidebar and found 
   some errors in my errorlog.
 * To fix, find **_line 318_** in **page-list.php**:
 *     ```
       $offset_count = 0;
       foreach($list_pages as $page){
       ```
   
 * And _replace with_:
 *     ```
       $offset_count = 0;
       if( $list_pages !== false && count( $list_pages ) > 0 ){
       foreach($list_pages as $page){
       ```
   
 * And _**line 419**_:
 *     ```
       }
       }
       ```
   
 * _Replace with_:
 *     ```
       }
       }
       }
       ```
   
 * (I didn’t add the extra indentation which would be needed for neat code 😉 )
 * Hope this helps!
 * Smile,
    Juliette
 * [http://wordpress.org/extend/plugins/page-list/](http://wordpress.org/extend/plugins/page-list/)

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

 *  Plugin Author [webvitalii](https://wordpress.org/support/users/webvitaly/)
 * (@webvitaly)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546036)
 * Thank you very much for your feedback.
    This fix will be added to next plugin’s
   commit.
 *  Thread Starter [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546040)
 * Excellent. Thank you.
 *  Thread Starter [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546170)
 * Unfortunately the fix is still missing from the plugin…. next version… ?
 *  Plugin Author [webvitalii](https://wordpress.org/support/users/webvitaly/)
 * (@webvitaly)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546171)
 * [Fixed](http://plugins.trac.wordpress.org/browser/page-list/trunk/page-list.php#L319).
 * I updated the code in the trunk, but I did not updated the plugin version, because
   it is minor changes.
    So users will not see the update notice but all next downloads
   will have the updated version.
 * So if you want to have the updated version – you should re-install the plugin.
 *  Plugin Author [webvitalii](https://wordpress.org/support/users/webvitaly/)
 * (@webvitaly)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546172)
 * Oh, it is already 8 months passed…
 * We need urgently to invent a time machine! 🙂
 *  Thread Starter [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546173)
 * Okidoki, understood. Thanks.

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

The topic ‘[Small bug fix] Error if page list is empty’ is closed to new replies.

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

 * 6 replies
 * 2 participants
 * Last reply from: [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/small-bugfix/#post-3546173)
 * Status: resolved