Skip to content

Commit f1cbdec

Browse files
SetHeaderElement.php: revert try-catch fix
This reverts the fix from here: 4.4.3.0...main#diff-2c905bd63ed59a54167749f6edb3e917e4742df635975daf813baa9f60e7f3efL155-L159 While the fix itself looks correct, it causes device-detection-php tests to fail, so for now lets revert it.
1 parent 93be459 commit f1cbdec

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)