Skip to content

Commit 4417f02

Browse files
robneubradyvercher
authored andcommitted
Check for an instance of the main GistPress class before running
Fixes #72
1 parent 453dbc0 commit 4417f02

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gistpress.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ function gistpress_i18n() {
6060
*/
6161
function gistpress_init() {
6262
global $gistpress, $gistpress_logger;
63-
$gistpress->set_logger( $gistpress_logger );
64-
$gistpress->run();
63+
if ( $gistpress instanceof GistPress ) {
64+
$gistpress->set_logger( $gistpress_logger );
65+
$gistpress->run();
66+
}
6567
}
6668
add_action( 'init', 'gistpress_init' );
6769

0 commit comments

Comments
 (0)