Skip to content

Commit 6059447

Browse files
committed
Fix bug
1 parent 49ae080 commit 6059447

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

model/common/token.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public function getToken( $args ) {
1313

1414
if ( is_wp_error( $user ) ) {
1515
$error_code = $user->get_error_code();
16-
1716
throw new Exception( $user->get_error_message( $error_code ) );
1817
}
1918

model/startup/startup.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ public function getVF_Resolvers()
1212
$result[$key] = function ($root, $args, $context) use ($value, $that) {
1313
try {
1414
return $that->load->resolver($value, $args);
15-
} catch (Exception $e) {
16-
throw new MySafeException($e->getMessage());
15+
} catch (\Exception $e) {
16+
$message = preg_replace('/(\s+)?\<a .*\>.*\<\/a\>(\s)?/', '',$e->getMessage());
17+
throw new VF_MySafeException($message);
1718
}
1819
};
1920
}

resolver/common/account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function login( $args ) {
1010
return array( 'token' => $token_info['token'], 'customer' => $this->get( $token_info['user_id'] ) );
1111

1212
} catch ( \Exception $e ) {
13-
throw new Exception( $e->getMessage() );
13+
throw new \Exception( $e->getMessage() );
1414
}
1515
}
1616

0 commit comments

Comments
 (0)