Commit 1ea6bb53 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1083 Fixed sending error message to STD_ERROR and exiting with 1 (as

ZP-1022).

Released under the Affero GNU General Public License (AGPL) version 3.
parent a2d1920c
...@@ -76,7 +76,8 @@ define('PATH_TO_ZPUSH', '../../src/'); ...@@ -76,7 +76,8 @@ define('PATH_TO_ZPUSH', '../../src/');
GAB2ContactsCLI::RunCommand(); GAB2ContactsCLI::RunCommand();
} }
catch (Exception $ex) { catch (Exception $ex) {
die(get_class($ex) . ": ". $ex->getMessage() . PHP_EOL); fwrite(STDERR, get_class($ex) . ": ". $ex->getMessage() . PHP_EOL);
exit(1);
} }
......
...@@ -107,7 +107,7 @@ class Kopano extends ContactWorker { ...@@ -107,7 +107,7 @@ class Kopano extends ContactWorker {
$companies = mapi_zarafa_getcompanylist($this->store); $companies = mapi_zarafa_getcompanylist($this->store);
if (is_array($companies)) { if (is_array($companies)) {
foreach($companies as $c) { foreach($companies as $c) {
$names[$c['companyname']] = bin2hex($c['companyid']); $names[trim($c['companyname'])] = bin2hex($c['companyid']);
} }
} }
return $names; return $names;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment