summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2022-01-05 15:25:49 +0100
committerAndrey Andreev <narf@devilix.net>2022-01-05 15:25:49 +0100
commit39da78b2588a60a2f43fb8f77448ab9604550978 (patch)
tree4d0489559a6040ef929921444e6b207adb6824ab /system/core
parent318c485b7b83356543c9aa7ab65464893d7eb8fe (diff)
Fix some minor PHP 8.1 deprecation warnings
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Common.php5
-rw-r--r--system/core/Input.php2
-rw-r--r--system/core/Security.php2
3 files changed, 4 insertions, 5 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 9e23a4ea5..a9b8828e3 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -778,11 +778,9 @@ if ( ! function_exists('_stringify_attributes'))
*/
function _stringify_attributes($attributes, $js = FALSE)
{
- $atts = NULL;
-
if (empty($attributes))
{
- return $atts;
+ return NULL;
}
if (is_string($attributes))
@@ -792,6 +790,7 @@ if ( ! function_exists('_stringify_attributes'))
$attributes = (array) $attributes;
+ $atts = '';
foreach ($attributes as $key => $val)
{
$atts .= ($js) ? $key.'='.$val.',' : ' '.$key.'="'.$val.'"';
diff --git a/system/core/Input.php b/system/core/Input.php
index 3fb4121eb..c3a0a9094 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -565,7 +565,7 @@ class CI_Input {
$which = FILTER_FLAG_IPV6;
break;
default:
- $which = NULL;
+ $which = 0;
break;
}
diff --git a/system/core/Security.php b/system/core/Security.php
index f6b0407f8..d1d4f8432 100644
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -193,7 +193,7 @@ class CI_Security {
$this->_csrf_set_hash();
}
- $this->charset = strtoupper(config_item('charset'));
+ $this->charset = strtoupper((string) config_item('charset'));
log_message('info', 'Security Class Initialized');
}