Skip to content

Commit abdcb23

Browse files
committed
is_a() was deprecated briefly in PHP 5.3, switching to instanceof
Additionally, `instanceof` is a bit faster because it is a language construct and not a function! Woo!
1 parent a05e00e commit abdcb23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

WP_Router.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ protected function identify_route( $query ) {
221221
return NULL;
222222
}
223223
$id = $query->query_vars[self::QUERY_VAR];
224-
if ( !isset($this->routes[$id]) || !is_a($this->routes[$id], 'WP_Route') ) {
224+
if ( !isset($this->routes[$id]) || ! $this->routes[$id] instanceof WP_Route ) {
225225
return NULL;
226226
}
227227
return $id;

0 commit comments

Comments
 (0)