aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2023-11-12 16:44:39 +0100
committerDaniel Lange <DLange@git.local>2023-11-12 16:44:39 +0100
commit8668200d7795d70e3e93a5e8d1a8522ca58769d4 (patch)
treeec0ab3d8902b60760108f4e93c3eee590436ed88
parent92fb31637e9fd5fb0ad81a70aa0bdd788a64627a (diff)
parent03e9c1a99eea56ceed39f0fcea38955a6716570e (diff)
downloadstikked-fit-master.tar.gz
stikked-fit-master.tar.bz2
stikked-fit-master.zip
Merge branch 'k4be+php8' of k4bek4be/Stikked into php8.xHEADmaster
-rw-r--r--htdocs/application/helpers/captcha_helper.php2
-rw-r--r--htdocs/application/libraries/Carabiner.php6
-rw-r--r--htdocs/application/libraries/Jsmin.php4
-rw-r--r--htdocs/system/core/Input.php2
-rw-r--r--htdocs/system/core/Output.php2
-rw-r--r--htdocs/system/libraries/Pagination.php2
-rw-r--r--htdocs/system/libraries/Session/drivers/Session_database_driver.php12
-rw-r--r--htdocs/themes/default/views/view/search.php5
8 files changed, 20 insertions, 15 deletions
diff --git a/htdocs/application/helpers/captcha_helper.php b/htdocs/application/helpers/captcha_helper.php
index 90940e9..e522fe8 100644
--- a/htdocs/application/helpers/captcha_helper.php
+++ b/htdocs/application/helpers/captcha_helper.php
@@ -350,7 +350,7 @@ if (!function_exists('display_captcha')) {
$rad1 = $radius * (($i + 1) / $points);
$x1 = (int) ($rad1 * cos($theta)) + $x_axis;
$y1 = (int) ($rad1 * sin($theta)) + $y_axis;
- imageline($im, $x, $y, $x1, $y1, $grid_color);
+ imageline($im, (int)$x, (int)$y, (int)$x1, (int)$y1, $grid_color);
$theta = $theta - $thetac;
}
diff --git a/htdocs/application/libraries/Carabiner.php b/htdocs/application/libraries/Carabiner.php
index 6fbafe2..7480368 100644
--- a/htdocs/application/libraries/Carabiner.php
+++ b/htdocs/application/libraries/Carabiner.php
@@ -938,14 +938,16 @@ class Carabiner {
private function _get_contents($ref)
{
+ $contents = false;
if( $this->isURL($ref) && ( ini_get('allow_url_fopen') == 0 || $this->force_curl ) ):
$this->_load('curl');
$contents = $this->CI->curl->simple_get($ref);
else:
-
- $contents = file_get_contents( $ref );
+ if($ref){
+ $contents = file_get_contents( $ref );
+ }
endif;
diff --git a/htdocs/application/libraries/Jsmin.php b/htdocs/application/libraries/Jsmin.php
index aa2aacd..8299b85 100644
--- a/htdocs/application/libraries/Jsmin.php
+++ b/htdocs/application/libraries/Jsmin.php
@@ -174,7 +174,7 @@ class JSMin {
}
protected function isAlphaNum($c) {
- return ord($c ?? '') > 126 || $c === '\\' || preg_match('/^[\w\$]$/', (string)$c) === 1;
+ return $c ? ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1 : false;
}
protected function min() {
@@ -306,4 +306,4 @@ class JSMin {
// -- Exceptions ---------------------------------------------------------------
class JSMinException extends Exception {}
-?> \ No newline at end of file
+?>
diff --git a/htdocs/system/core/Input.php b/htdocs/system/core/Input.php
index eba5f67..fc60236 100644
--- a/htdocs/system/core/Input.php
+++ b/htdocs/system/core/Input.php
@@ -607,7 +607,7 @@ class CI_Input {
$which = FILTER_FLAG_IPV6;
break;
default:
- $which = 0;
+ $which = FILTER_DEFAULT;
break;
}
diff --git a/htdocs/system/core/Output.php b/htdocs/system/core/Output.php
index a629a09..40ac2a1 100644
--- a/htdocs/system/core/Output.php
+++ b/htdocs/system/core/Output.php
@@ -459,7 +459,7 @@ class CI_Output {
if ($this->parse_exec_vars === TRUE)
{
$memory = round(memory_get_usage() / 1024 / 1024, 2).'MB';
- $output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output);
+ $output = $output ? str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output) : '';
}
// --------------------------------------------------------------------
diff --git a/htdocs/system/libraries/Pagination.php b/htdocs/system/libraries/Pagination.php
index 4d945a0..d73b023 100644
--- a/htdocs/system/libraries/Pagination.php
+++ b/htdocs/system/libraries/Pagination.php
@@ -523,7 +523,7 @@ class CI_Pagination {
}
// If something isn't quite right, back to the default base page.
- if ( ! ctype_digit($this->cur_page) OR ($this->use_page_numbers && (int) $this->cur_page === 0))
+ if ( ! ctype_digit(strval($this->cur_page)) OR ($this->use_page_numbers && (int) $this->cur_page === 0))
{
$this->cur_page = $base_page;
}
diff --git a/htdocs/system/libraries/Session/drivers/Session_database_driver.php b/htdocs/system/libraries/Session/drivers/Session_database_driver.php
index 4b47536..3338703 100644
--- a/htdocs/system/libraries/Session/drivers/Session_database_driver.php
+++ b/htdocs/system/libraries/Session/drivers/Session_database_driver.php
@@ -127,7 +127,7 @@ class CI_Session_database_driver extends CI_Session_driver implements CI_Session
* @param string $name Session cookie name, unused
* @return bool
*/
- public function open($save_path, $name)
+ public function open(string $path, string $name): bool
{
if (empty($this->_db->conn_id) && ! $this->_db->db_connect())
{
@@ -149,7 +149,7 @@ class CI_Session_database_driver extends CI_Session_driver implements CI_Session
* @param string $session_id Session ID
* @return string Serialized session data
*/
- public function read($session_id)
+ public function read($session_id): string|false
{
if ($this->_get_lock($session_id) === FALSE)
{
@@ -205,7 +205,7 @@ class CI_Session_database_driver extends CI_Session_driver implements CI_Session
* @param string $session_data Serialized session data
* @return bool
*/
- public function write($session_id, $session_data)
+ public function write($session_id, $session_data): bool
{
// Prevent previous QB calls from messing with our queries
$this->_db->reset_query();
@@ -277,7 +277,7 @@ class CI_Session_database_driver extends CI_Session_driver implements CI_Session
*
* @return bool
*/
- public function close()
+ public function close() : bool
{
return ($this->_lock && ! $this->_release_lock())
? $this->_failure
@@ -294,7 +294,7 @@ class CI_Session_database_driver extends CI_Session_driver implements CI_Session
* @param string $session_id Session ID
* @return bool
*/
- public function destroy($session_id)
+ public function destroy($session_id) : bool
{
if ($this->_lock)
{
@@ -332,7 +332,7 @@ class CI_Session_database_driver extends CI_Session_driver implements CI_Session
* @param int $maxlifetime Maximum lifetime of sessions
* @return bool
*/
- public function gc($maxlifetime)
+ public function gc(int $max_lifetime): int|false
{
// Prevent previous QB calls from messing with our queries
$this->_db->reset_query();
diff --git a/htdocs/themes/default/views/view/search.php b/htdocs/themes/default/views/view/search.php
index d568aab..67dcc57 100644
--- a/htdocs/themes/default/views/view/search.php
+++ b/htdocs/themes/default/views/view/search.php
@@ -3,7 +3,10 @@
<div class="item">
<label for="search"><?php echo lang('paste_search'); ?>
</label>
- <input type="text" name="search" value="<?php echo str_replace('"', '&quot;', $this->input->get('search')); ?>" id="search" maxlength="100" tabindex="1" />
+ <input type="text" name="search" value="<?php
+$search = $this->input->get('search');
+echo $search ? str_replace('"', '&quot;', $search) : '';
+?>" id="search" maxlength="100" tabindex="1" />
</div>
</div>
</form>

© 2014-2024 Faster IT GmbH | imprint | privacy policy