fix phan errors
This commit is contained in:
parent
e3e70ee35b
commit
d15e265e56
2 changed files with 9 additions and 8 deletions
|
|
@ -82,11 +82,12 @@ $search_version = GETPOST('search_version', 'alpha');
|
|||
|
||||
|
||||
// For remotestore search
|
||||
$options = array();
|
||||
$options['per_page'] = 10;
|
||||
$options['no_page'] = ((int) GETPOSTINT('no_page') ? GETPOSTINT('no_page') : 1);
|
||||
$options['categorie'] = ((int) (GETPOSTINT('categorie') ? GETPOSTINT('categorie') : 0));
|
||||
$options['search'] = GETPOST('search_keyword', 'alpha');
|
||||
$options = array();
|
||||
$options['per_page'] = 10;
|
||||
$options['no_page'] = ((int) GETPOSTINT('no_page') ? GETPOSTINT('no_page') : 1);
|
||||
$options['categorie'] = ((int) (GETPOSTINT('categorie') ? GETPOSTINT('categorie') : 0));
|
||||
$options['search'] = GETPOST('search_keyword', 'alpha');
|
||||
$options['source'] = 'dolistore';
|
||||
|
||||
//$remotestore = new Dolistore(false);
|
||||
$remotestore = new ExternalModules();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class ExternalModules
|
|||
*/
|
||||
public $shop_url; // the url of the shop
|
||||
/**
|
||||
* @var int
|
||||
* @var string
|
||||
*/
|
||||
public $lang; // the integer representing the lang in the store
|
||||
/**
|
||||
|
|
@ -362,7 +362,7 @@ class ExternalModules
|
|||
*/
|
||||
public function buildSorter($key)
|
||||
{
|
||||
return function ($a, $b) use ($key) {
|
||||
return function (array $a, array $b) use ($key): int {
|
||||
return strnatcmp($a[$key], $b[$key]);
|
||||
};
|
||||
}
|
||||
|
|
@ -517,7 +517,7 @@ class ExternalModules
|
|||
return 'This call to the API returned an unexpected HTTP status of: ' . $request['status_code'];
|
||||
}
|
||||
|
||||
if (!empty($error_message)) {
|
||||
if (!empty($error_message) && isset($error_message)) {
|
||||
$response = $request['response'];
|
||||
if (isset($response['errors']) && is_array($response['errors'])) {
|
||||
foreach ($response['errors'] as $error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue