Skip to content

Commit 4ee7742

Browse files
committed
docs: add comment manually
1 parent 2276c6a commit 4ee7742

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

system/Cache/Handlers/PredisHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ public function get(string $key)
8888

8989
return match ($data['__ci_type']) {
9090
'array', 'object' => unserialize($data['__ci_value']),
91-
'boolean', 'integer', 'double', 'string', 'NULL' => settype($data['__ci_value'], $data['__ci_type']) ? $data['__ci_value'] : null,
91+
'boolean',
92+
'integer',
93+
'double', // Yes, 'double' is returned and NOT 'float'
94+
'string',
95+
'NULL' => settype($data['__ci_value'], $data['__ci_type']) ? $data['__ci_value'] : null,
9296
default => null,
9397
};
9498
}

system/Cache/Handlers/RedisHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ public function get(string $key)
114114

115115
return match ($data['__ci_type']) {
116116
'array', 'object' => unserialize($data['__ci_value']),
117-
'boolean', 'integer', 'double', 'string', 'NULL' => settype($data['__ci_value'], $data['__ci_type']) ? $data['__ci_value'] : null,
117+
'boolean',
118+
'integer',
119+
'double', // Yes, 'double' is returned and NOT 'float'
120+
'string',
121+
'NULL' => settype($data['__ci_value'], $data['__ci_type']) ? $data['__ci_value'] : null,
118122
default => null,
119123
};
120124
}

system/Common.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ function env(string $key, $default = null)
373373
return $default;
374374
}
375375

376+
// Handle any boolean values
376377
return match (strtolower($value)) {
377378
'true' => true,
378379
'false' => false,

0 commit comments

Comments
 (0)