diff --git a/classes/API/Injector/UserAgentInjector.php b/classes/API/Injector/UserAgentInjector.php index 0677b208..c152c446 100644 --- a/classes/API/Injector/UserAgentInjector.php +++ b/classes/API/Injector/UserAgentInjector.php @@ -70,8 +70,8 @@ protected function getUserAgent() _PS_VERSION_, $this->module->version, PHP_VERSION, - str_replace(' ', '_', php_uname('s') . ' ' . php_uname('r')), - php_uname('m') + function_exists('php_uname') ? str_replace(' ', '_', php_uname('s') . ' ' . php_uname('r')) : 'Undefined', + function_exists('php_uname') ? php_uname('m') : 'Undefined' ); } }