Ticket #30518: 30518.patch
File 30518.patch, 1.1 KB (added by , 11 years ago) |
---|
-
wp-includes/class.wp-dependencies.php
331 331 * 332 332 * @param array $queue An array of queued _WP_Dependency handle objects. 333 333 * @param string $handle Name of the item. Should be unique. 334 * @param int $depth Counts down to 0, to prevent infinite recursions. 334 335 * @return boolean Whether the handle is found after recursively searching the dependency tree. 335 336 */ 336 protected function recurse_deps( $queue, $handle 337 protected function recurse_deps( $queue, $handle, $depth=15) { 337 338 foreach ( $queue as $queued ) { 338 339 if ( ! isset( $this->registered[ $queued ] ) ) { 339 340 continue; … … 341 342 342 343 if ( in_array( $handle, $this->registered[ $queued ]->deps ) ) { 343 344 return true; 344 } elseif ( $this->recurse_deps( $this->registered[ $queued ]->deps, $handle) ) {345 } elseif ($depth && $this->recurse_deps( $this->registered[ $queued ]->deps, $handle, --$depth ) ) { 345 346 return true; 346 347 } 347 348 }