|
@@ -244,13 +244,18 @@ ORDER BY parameters.ordinal_position;");
|
244
|
244
|
{
|
245
|
245
|
$sp_ = $spQuery->fetchAll();
|
246
|
246
|
$sps = array("in" => array(), "out" => array());
|
247
|
|
- foreach ($sp_ as $p)
|
248
|
|
- $sps[strtolower($p["parameter_mode"])][] = $p;
|
|
247
|
+ foreach ($sp_ as $p) {
|
|
248
|
+ $type = strtolower($p["parameter_mode"]);
|
|
249
|
+ if (empty($p["name"])) {
|
|
250
|
+ $p["name"] = "arg" . count($sps[$type]);
|
|
251
|
+ }
|
|
252
|
+ $sps[$type][] = $p;
|
|
253
|
+ }
|
249
|
254
|
$out_count = count($sps['out']);
|
250
|
255
|
if ($out_count == 0)
|
251
|
256
|
{
|
252
|
257
|
$sps['out'][] = array(
|
253
|
|
- "name" => $sp_name,
|
|
258
|
+ "name" => empty($sp_name) ? "arg" . count($sps['out']) : $sp_name,
|
254
|
259
|
"data_type" => $sp["data_type"],
|
255
|
260
|
"parameter_mode" => "OUT"
|
256
|
261
|
);
|