Welcome Guest, Not a member yet? Register   Sign In
DB query caching and php 7.2
#1

Hello,

I just upgraded my server to PHP 7.2 and faced an error in the line 2673 of the file DB_query_builder.php

the error is a result of the change in the behavior of the function count() in PHP 7.2 and I did wrote a fast fix for that problem. It might not be the best approach but it did the job. I changed this:

PHP Code:
           for ($i 0$c count($this->$qb_variable); $i $c$i++)
 
           {
 
               if ( ! in_array($this->{$qb_variable}[$i], $qb_newTRUE))
 
               {
 
                   $qb_new[] = $this->{$qb_variable}[$i];
 
                   if ($val === 'select')
 
                   {
 
                       $qb_no_escape[] = $this->qb_no_escape[$i];
 
                   }
 
               }
 
           


to

PHP Code:
if (null!=$this->$qb_variable)
{
    for (
$i 0$c count($this->$qb_variable); $i $c$i++)
    {
        if ( ! 
in_array($this->{$qb_variable}[$i], $qb_newTRUE))
        {
            
$qb_new[] = $this->{$qb_variable}[$i];
            if (
$val === 'select')
            {
                
$qb_no_escape[] = $this->qb_no_escape[$i];
            }
        }
    }

Reply


Messages In This Thread
DB query caching and php 7.2 - by abonajd - 12-21-2017, 10:57 AM
RE: DB query caching and php 7.2 - by dave friend - 12-23-2017, 08:59 AM
RE: DB query caching and php 7.2 - by abonajd - 12-26-2017, 01:19 PM
RE: DB query caching and php 7.2 - by skunkbad - 12-26-2017, 02:19 PM
RE: DB query caching and php 7.2 - by abonajd - 12-26-2017, 03:55 PM
RE: DB query caching and php 7.2 - by skunkbad - 12-26-2017, 08:24 PM
RE: DB query caching and php 7.2 - by Narf - 01-02-2018, 09:18 AM
RE: DB query caching and php 7.2 - by abonajd - 12-27-2017, 08:48 AM
RE: DB query caching and php 7.2 - by InsiteFX - 12-28-2017, 05:12 AM
RE: DB query caching and php 7.2 - by abonajd - 12-28-2017, 07:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB