Skip to content

Commit 139abfe

Browse files
author
Denis Cornehl
committed
more flexible parsing
1 parent fe368a5 commit 139abfe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

phpcclib.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,18 +1197,18 @@ public function __construct($message, $status)
11971197
$errors = $v;
11981198
}
11991199

1200-
if (count($errors) > 0) {
1201-
$this->message = '';
1200+
$this->message = '';
1201+
1202+
if (strlen($rc) > 0)
1203+
$this->message .= "$rc\n";
12021204

1205+
if (count($errors) > 0) {
12031206
foreach ($errors as $k => $v) {
12041207
$this->message .= sprintf("%s: %s\n", $k, $v);
12051208
}
1206-
} else if (strlen($rc) > 0)
1207-
$this->message = $rc;
1208-
else
1209-
{
1210-
//fallback, old error-format
1211-
$this->message = '';
1209+
}
1210+
1211+
if ($this->message == '') {
12121212
foreach ($obj as $k => $v) {
12131213
$this->message .= sprintf("%s: %s\n", $k, $v);
12141214
}

0 commit comments

Comments
 (0)