Skip to content

Commit

Permalink
RELEASE 3.1.13.1 - improved PHP 8.1 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivantcholakov committed Aug 26, 2022
1 parent 521352f commit 55b30c0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 - 2021 Ivan Tcholakov
Copyright (c) 2016 - 2022 Ivan Tcholakov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://github.com/ivantcholakov/codeigniter-restserver-test

A temporary repository for testing https://github.com/chriskacerguis/codeigniter-restserver

Version: 3.1.13.0
Version: 3.1.13.1

Requires PHP >= 7.3.0

Expand Down
6 changes: 3 additions & 3 deletions application/libraries/REST_Controller_54.php
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ protected function _detect_api_key()

foreach ($list_ip_addresses as $ip_address)
{
if ($this->input->ip_address() === trim($ip_address))
if ($this->input->ip_address() === trim((string) $ip_address))
{
// there is a match, set the the value to TRUE and break out of the loop
$found_address = TRUE;
Expand Down Expand Up @@ -1817,7 +1817,7 @@ protected function _xss_clean($value, $xss_clean)
*/
public function validation_errors()
{
$string = strip_tags($this->form_validation->error_string());
$string = strip_tags((string) $this->form_validation->error_string());

return explode(PHP_EOL, trim($string, PHP_EOL));
}
Expand Down Expand Up @@ -2176,7 +2176,7 @@ protected function _check_whitelist_auth()
{
// As $ip is a reference, trim leading and trailing whitespace, then store the new value
// using the reference
$ip = trim($ip);
$ip = trim((string) $ip);
}

if (in_array($this->input->ip_address(), $whitelist) === FALSE)
Expand Down
1 change: 1 addition & 0 deletions application/libraries/Rest_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ protected function _format_response($response)

// Find out what format the data was returned in
$returned_mime = @$this->_ci->curl->info['content_type'];
$returned_mime = (string) $returned_mime;

// If they sent through more than just mime, strip it off
if (strpos($returned_mime, ';'))
Expand Down

0 comments on commit 55b30c0

Please sign in to comment.