Skip to content

Commit

Permalink
[exceptions] [bug-fix] The expected exception parameter is an array, …
Browse files Browse the repository at this point in the history
…not a direct string.
  • Loading branch information
vovafeldman committed Aug 30, 2017
1 parent ca2c95e commit 439dde4
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions includes/class-freemius.php
Original file line number Diff line number Diff line change
Expand Up @@ -3251,10 +3251,24 @@ private function parse_settings( &$plugin_info ) {
}

if ( false === $id ) {
throw new Freemius_Exception( 'Plugin id parameter is not set.' );
throw new Freemius_Exception( array(
'error' => array(
'type' => 'ParameterNotSet',
'message' => 'Plugin id parameter is not set.',
'code' => 'plugin_id_not_set',
'http' => 500,
)
) );
}
if ( false === $public_key ) {
throw new Freemius_Exception( 'Plugin public_key parameter is not set.' );
throw new Freemius_Exception( array(
'error' => array(
'type' => 'ParameterNotSet',
'message' => 'Plugin public_key parameter is not set.',
'code' => 'plugin_public_key_not_set',
'http' => 500,
)
) );
}

$plugin = ( $this->_plugin instanceof FS_Plugin ) ?
Expand Down

0 comments on commit 439dde4

Please sign in to comment.