Make WordPress Core

Ticket #42319: 42319.patch

File 42319.patch, 1.0 KB (added by umangvaghela123, 9 years ago)
  • src/wp-includes/class-wp-hook.php

     
    288288                                        $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
    289289                                }
    290290                        }
    291                 } while ( false !== next( $this->iterations[ $nesting_level ] ) );
     291                } while ( ! is_null( $this->iterations[ $nesting_level ] ) && false !== next( $this->iterations[ $nesting_level ] ) );
    292292
    293293                unset( $this->iterations[ $nesting_level ] );
    294294                unset( $this->current_priority[ $nesting_level ] );
     
    331331                        foreach ( $this->callbacks[ $priority ] as $the_ ) {
    332332                                call_user_func_array( $the_['function'], $args );
    333333                        }
    334                 } while ( false !== next( $this->iterations[ $nesting_level ] ) );
     334                } while ( ! is_null( $this->iterations[ $nesting_level ] ) && false !== next( $this->iterations[ $nesting_level ] ) );
    335335
    336336                unset( $this->iterations[ $nesting_level ] );
    337337                $this->nesting_level--;