Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit 340c29f

Browse files
author
Arbuzov Sergey
committed
Merge pull request #3 from Bdido86/WTPBX-2419
WTPBX-2419 / Множественная передача переменных
2 parents 7322ee6 + c1bc2bf commit 340c29f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

phpagi-asmanager.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,15 @@ function send_request($action, $parameters=array())
132132
{
133133
$req = "Action: $action\r\n";
134134
foreach($parameters as $var=>$val)
135-
$req .= "$var: $val\r\n";
135+
{
136+
// Модификация. Передача нескольких параметров
137+
if (is_array($val))
138+
foreach ($val as $l){
139+
$req .= "$var: $l\r\n";
140+
}
141+
else
142+
$req .= "$var: $val\r\n";
143+
}
136144
$req .= "\r\n";
137145
fwrite($this->socket, $req);
138146
return $this->wait_response();

0 commit comments

Comments
 (0)