You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, ArrayObject given in C:\xampp\htdocs\tests\cpanel\Cpanel\Core\Object.php:111
Stack trace:
#0 C:\xampp\htdocs\tests\cpanel\Cpanel\Core\Object.php(74): Cpanel_Core_Object->setOptions(Array)
#1 C:\xampp\htdocs\tests\cpanel\Cpanel\PublicAPI.php(102): Cpanel_Core_Object->__construct(Array)
#2 C:\xampp\htdocs\tests\cpanel\Cpanel\PublicAPI.php(140): Cpanel_PublicAPI->__construct(Array)
#3 C:\xampp\htdocs\tests\cpanel\index.php(11): Cpanel_PublicAPI::getInstance()
#4 {main}
thrown in C:\xampp\htdocs\tests\cpanel\Cpanel\Core\Object.php on line 111
The code is:
// Include the autoloader
require_once realpath( dirname(__FILE__) . '/Cpanel/Util/Autoload.php');
// Make a configuration data array
$config=array(
'service'=> array(
'whm'=> array(
'config' => array(
'host'=> '95.217.75.9',
'user'=> 'transpas',
'password'=> 'K05c?@eMpW8]'
),
),
),
);
$cp=Cpanel_PublicAPI::getInstance($config);
$accounts=$cp->whm_api('listaccts');
print_R($accounts);
The text was updated successfully, but these errors were encountered:
I'm getting this error.
The code is:
The text was updated successfully, but these errors were encountered: