Skip to content

Commit 29d8ac8

Browse files
committed
Make sure to cast string boolean values to actual booleans
1 parent 74e8de0 commit 29d8ac8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

wp-config.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
foreach ($_ENV as $key => $value) {
88
$capitalized = strtoupper($key);
99
if (!defined($capitalized)) {
10+
// Convert string boolean values to actual booleans
11+
if (in_array($value, ['true', 'false'])) {
12+
$value = filter_var($value, FILTER_VALIDATE_BOOLEAN);
13+
}
14+
1015
define($capitalized, $value);
1116
}
1217
}

0 commit comments

Comments
 (0)