Skip to content

Commit 109f17b

Browse files
add php 5.6 patch for webform time.inc to patch ?? operator to isset
1 parent bdb04b4 commit 109f17b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

fix_php5.6_compatibility.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- /app/public/sites/all/modules/webform/components/time.inc
2+
+++ /app/public/sites/all/modules/webform/components/time.inc
3+
@@ -733,7 +733,7 @@
4+
*/
5+
function _webform_submit_time($component, $value) {
6+
// Convert to 24-hour time before string conversion.
7+
if ($component['extra']['hourformat'] == '12-hour') {
8+
$value = webform_time_convert($value, '24-hour');
9+
}
10+
11+
- return ($value['hour'] ?? '') !== '' ? webform_date_string($value, 'time') : '';
12+
+ return isset($value['hour']) && $value['hour'] !== '' ? webform_date_string($value, 'time') : '';
13+
}

0 commit comments

Comments
 (0)