Open walterheck opened 12 years ago
Also:
> php -v
PHP 5.3.13 with Suhosin-Patch (cli) (built: Jun 20 2012 17:05:20)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
> uname -a
Darwin walterheck-mbp.local 12.0.0 Darwin Kernel Version 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~1/RELEASE_X86_64 x86_64
Same problem.
My setup is
php -v PHP 5.3.10 (cli) (built: Dec 13 2012 22:30:08) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
This is because the internal __init() function is not correctly detecting whether the API was already initialized. To fix this, change line 191 from
if (get_class(self::$instance) != "ZabbixAPI")
to
if(!(self::$instance instanceof ZabbixAPI))
Fixed in Fork.
@lazylionca Feel free to submit a PR, I'll merge it in here
Unless I call ZabbixAPI::debugEnabled(FALSE); first, any API calls fail. See:
gives:
whereas:
gives: