[Git][codeigniterpower/codeigniterpower][master] 3 commits: Fix cache redis ttl to work

0 views
Skip to first unread message

Герхард PICCORO Lenz McKAY (@mckaygerhard)

unread,
Feb 6, 2024, 1:15:19 PMFeb 6
to venenux...@googlegroups.com

Герхард PICCORO Lenz McKAY pushed to branch master at codeigniterpower / codeigniterpower

Commits:

  • d26b4cc1
    by mckaygerhard at 2024-02-06T13:30:34-04:00
    Fix cache redis ttl to work
    
    * backported redis cache ttl does not work from
      https://github.com/bcit-ci/CodeIgniter/pull/6231
    
  • 37442e03
    by mckaygerhard at 2024-02-06T14:06:47-04:00
    Fix "Serialization of 'ReflectionMethod' is not allowed"
    
    * With 0925b50 there have been proper fixes
      for CI_Migration and CI_Xmlrpcs classes. But
      for CI_Codeigniter the former is_callable check
      has been removed without any substitution.
    * This is another fix for PHP8 8.1 compatibility layer php
    
  • bfef7d2c
    by mckaygerhard at 2024-02-06T14:13:04-04:00
    Fixes bcit-ci#6175 fix $this->uri->ruri_string() generates in PHP 8.1
    
    * it coplements prevous commit and related to
      commit ad1a30755626c1cee0b03bb95ccac2d894306288
      is not the proper way but compatible with
      https://github.com/bcit-ci/CodeIgniter/pull/6117
      and solves
      https://github.com/bcit-ci/CodeIgniter/issues/6120
    

3 changed files:

Changes:

  • appsys/core/CodeIgniter.php
    ... ... @@ -435,7 +435,7 @@ if ( ! is_php('5.4'))
    435 435
     		 * ReflectionMethod::isConstructor() is the ONLY reliable check,
    
    436 436
     		 * knowing which method will be executed as a constructor.
    
    437 437
     		 */
    
    438
    -		else
    
    438
    +		elseif ( ! in_array($method, get_class_methods($class)))
    
    439 439
     		{
    
    440 440
     			$reflection = new ReflectionMethod($class, $method);
    
    441 441
     			if ( ! $reflection->isPublic() OR $reflection->isConstructor())
    

  • appsys/core/URI.php
    ... ... @@ -645,7 +645,7 @@ class CI_URI {
    645 645
     	 */
    
    646 646
     	public function ruri_string()
    
    647 647
     	{
    
    648
    -		return ltrim(load_class('Router', 'core')->directory, '/').implode('/', $this->rsegments);
    
    648
    +		return ltrim((string) load_class('Router', 'core')->directory, '/').implode('/', $this->rsegments);
    
    649 649
     	}
    
    650 650
     
    
    651 651
     }

  • appsys/libraries/Cache/drivers/Cache_redis.php
    ... ... @@ -214,6 +214,10 @@ class CI_Cache_redis extends CI_Driver
    214 214
     			$this->_redis->{static::$_sRemove_name}('_ci_redis_serialized', $id);
    
    215 215
     		}
    
    216 216
     
    
    217
    +		if (is_numeric($ttl)) {
    
    218
    +			$this->_redis->expireAt($id, time() + $ttl);
    
    219
    +		}
    
    220
    +
    
    217 221
     		return $this->_redis->set($id, $data, $ttl);
    
    218 222
     	}
    
    219 223
     
    


View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help

Reply all
Reply to author
Forward
0 new messages