Skip to content

Commit c5b7213

Browse files
Merged Pull Request '#15 postindustria-tech:revert-setheaderelement-fix->main : 'SetHeaderElement.php: revert try-catch fix''
SetHeaderElement.php: revert try-catch fix
2 parents 575a3be + f1cbdec commit c5b7213

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

SetHeaderElement.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,13 @@ public function getPropertyValue($flowData, $elementKey, $propertyKey){
152152
}
153153

154154
$propertyKey = strtolower($propertyKey);
155-
if (isset($elementData->$propertyKey)) {
155+
// TODO: catch is never called here. Consider replacing it with:
156+
// if (isset($elementData->$propertyKey))
157+
// The change can't be made right now, as it causes device-detection-php
158+
// tests to fail. Further investigation is needed.
159+
try {
156160
$property = $elementData->$propertyKey;
157-
} else {
161+
} catch (Exception $e) {
158162
echo sprintf(Messages::PROPERTY_NOT_FOUND, $propertyKey, $elementKey);
159163
return "";
160164
}

0 commit comments

Comments
 (0)