Skip to content

Commit

Permalink
Merge pull request #180 from Freemius/develop
Browse files Browse the repository at this point in the history
[exceptions] [bug-fix] The expected exception parameter is an array, …
  • Loading branch information
vovafeldman authored Aug 30, 2017
2 parents 1e09b21 + 439dde4 commit 8463dc2
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 8463dc2

Please sign in to comment.