Skip to content

Commit 602ee53

Browse files
committed
minor bug fix
1 parent a2f0e56 commit 602ee53

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"keywords": ["laravel", "cpanel", "cpanel api", "cpanel uapi"],
55
"homepage": "https://www.webreinvent.com",
66
"license": "MIT",
7-
"version": "1.0.2",
7+
"version": "1.0.3",
88
"authors": [
99
{
1010
"name": "WebReinvent",

src/CPanel.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function setAllPrivilegesOnDatabase($database_user, $database_name)
122122
//-----------------------------------------------------
123123
public function callUAPI($Module, $function, $parameters_array = array())
124124
{
125-
$this->call($Module, $function, $parameters_array);
125+
return $this->call($Module, $function, $parameters_array);
126126
}
127127
//-----------------------------------------------------
128128

@@ -137,7 +137,10 @@ public function call($module, $function, $args = array())
137137

138138
$url = $this->protocol.'://'.$this->domain . ':' . $this->port . '/execute/' . $module;
139139
$url .= "/".$function;
140-
$url .= '?'. $parameters;
140+
if(count($args) > 0)
141+
{
142+
$url .= '?'. $parameters;
143+
}
141144

142145
$headers = array(
143146
"Authorization: cpanel " . $this->username . ':' . $this->token,

0 commit comments

Comments
 (0)