Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit bdc4bce

Browse files
committed
✨ add PHP8.0 and PHP8.1 quick support
Signed-off-by: otengkwame <[email protected]>
1 parent b007dc7 commit bdc4bce

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

framework/core/Input.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ public function ip_address()
572572
* @param string $which IP protocol: 'ipv4' or 'ipv6'
573573
* @return bool
574574
*/
575-
public function valid_ip($ip, $which = '')
575+
public function valid_ip($ip = '', $which = '')
576576
{
577577
switch (strtolower($which))
578578
{
@@ -583,7 +583,7 @@ public function valid_ip($ip, $which = '')
583583
$which = FILTER_FLAG_IPV6;
584584
break;
585585
default:
586-
$which = NULL;
586+
$which = FILTER_DEFAULT;
587587
break;
588588
}
589589

framework/libraries/Form_validation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,11 +1052,11 @@ public function set_checkbox($field = '', $value = '', $default = FALSE)
10521052
* @param string
10531053
* @return bool
10541054
*/
1055-
public function required($str)
1055+
public function required($str = '')
10561056
{
10571057
return is_array($str)
10581058
? (empty($str) === FALSE)
1059-
: (trim($str) !== '');
1059+
: (isset($str) ? trim($str) !== '' : FALSE);
10601060
}
10611061

10621062
// --------------------------------------------------------------------

framework/libraries/Session/Session_driver.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,9 @@ public function php5_validate_id()
139139
*/
140140
protected function _cookie_destroy()
141141
{
142-
// return setcookie(
143-
// $this->_config['cookie_name'],
144-
// NULL,
145-
// 1,
146-
// $this->_config['cookie_path'],
147-
// $this->_config['cookie_domain'],
148-
// $this->_config['cookie_secure'],
149-
// TRUE
150-
// );
151-
// using setcookie with array option to add cookie 'samesite' attribute
152142
return setcookie(
153143
$this->_config['cookie_name'],
154-
NULL,
144+
'',
155145
[
156146
'expires' => 1,
157147
'path' => $this->_config['cookie_path'],

0 commit comments

Comments
 (0)