Skip to content

Commit 7df25e9

Browse files
committed
Better parsing error response for XSLT based imports
Unterminated string in Makefile fix Debian package renamed to php-spojenet-flexibee
1 parent fccc9d9 commit 7df25e9

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fresh:
1010
static:
1111
composer update
1212
echo rm -rf static/*
13-
echo "STATIC #######################
13+
echo "STATIC #######################"
1414
cd tools/ ; ./update_all.sh ; cd ..
1515

1616
clean:

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"phing/phing": "*"
3030
},
3131
"replace": {
32-
"spoje.net/flexipeehp": "*"
32+
"spoje.net/flexipeehp": "*",
33+
"spoje.net/flexibee": "*"
3334
},
3435
"scripts": {
3536
"post-install-cmd": [

src/FlexiPeeHP/FlexiBeeRO.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,9 +1077,17 @@ public function parseResponse($responseDecoded, $responseCode) {
10771077
*/
10781078
public function parseError(array $responseDecoded) {
10791079
if (array_key_exists('results', $responseDecoded)) {
1080-
$this->errors = $responseDecoded['results'][0]['errors'];
1080+
1081+
foreach ($responseDecoded['results'][0]['result'] as $result) {
1082+
if (array_key_exists('errors', $result)) {
1083+
foreach ($result as $error) {
1084+
$this->errors[] = current($error);
1085+
}
1086+
}
1087+
}
1088+
10811089
foreach ($this->errors as $errorInfo) {
1082-
$this->addStatusMessage($errorInfo['message'], 'error');
1090+
$this->addStatusMessage(array_key_exists('error',$errorInfo) ? $errorInfo['error'] : $errorInfo['message'], 'error');
10831091
if (array_key_exists('for', $errorInfo)) {
10841092
unset($errorInfo['message']);
10851093
$this->addStatusMessage(json_encode($errorInfo), 'debug');

0 commit comments

Comments
 (0)