Title: Infinite loop &#8211; error
Last modified: August 30, 2016

---

# Infinite loop – error

 *  [Artem P.](https://wordpress.org/support/users/madeinua/)
 * (@madeinua)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/infinite-loop-error/)
 * Billion notices in the log file:
 * PHP Notice: Trying to get property of non-object in /wp-content/plugins/revision-
   control/revision-control.php on line 193
 * I think you while ( count($items) > $keep ) {} will never stop working 🙁
 * [https://wordpress.org/plugins/revision-control/](https://wordpress.org/plugins/revision-control/)

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

 *  Thread Starter [Artem P.](https://wordpress.org/support/users/madeinua/)
 * (@madeinua)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/infinite-loop-error/#post-6639557)
 * Related issue:
 * `$default = $this->option($post->post_type, 'per-type')`
 * returns -1. Since this is numeric value you do the following:
 * `$keep = $new;`
 * and the do a check:
 * `while ( count($items) > $keep ) {`
 * but -1 always will be less than count($items)!
 * Probably this problem comes from my new custom post type which was added after
   your plugin initialization.
 *  Plugin Author [Dion Hulse](https://wordpress.org/support/users/dd32/)
 * (@dd32)
 * Meta Developer
 * [10 years, 7 months ago](https://wordpress.org/support/topic/infinite-loop-error/#post-6639735)
 * Hi [@madeinua](https://wordpress.org/support/users/madeinua/)
 * Thanks for the bug report! I’ll have a look into it, but it sounds like you’re
   probably right 🙁

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

The topic ‘Infinite loop – error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/revision-control.svg)
 * [Revision Control](https://wordpress.org/plugins/revision-control/)
 * [Support Threads](https://wordpress.org/support/plugin/revision-control/)
 * [Active Topics](https://wordpress.org/support/plugin/revision-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/revision-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/revision-control/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Dion Hulse](https://wordpress.org/support/users/dd32/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/infinite-loop-error/#post-6639735)
 * Status: not resolved