Skip to content

Commit 7539633

Browse files
authored
Merge pull request #247 from indieweb/fix/cli
fix cli calls
2 parents c70e594 + fa93715 commit 7539633

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

includes/class-indieauth-authorize.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ abstract class IndieAuth_Authorize {
1010
public $response = array();
1111

1212
public function load() {
13+
// do not call in CLI environment
14+
if ( defined( 'WP_CLI' ) ) {
15+
return;
16+
}
17+
1318
// WordPress validates the auth cookie at priority 10 and this cannot be overridden by an earlier priority
1419
// It validates the logged in cookie at 20 and can be overridden by something with a higher priority
1520
add_filter( 'determine_current_user', array( $this, 'determine_current_user' ), 15 );

0 commit comments

Comments
 (0)