Fatal error: func_get_args(): Can't be used as a function parameter upgrade from 5.50 - 5.52

Permalink 1 user found helpful
Hi guys,

I know this has been addressed several times but i cant seem to get the change working..

My code in the item_list.php looks like this:

/** 
    * Sets up a column to sort by
    */
   public function sortByMultiple() {
      $args = func_get_args();
      for ($i = 0; $i < count($args); $i++) {
         $this->sortByString .= $args[$i];
         if (($i + 1) < count($args)) { 
            $this->sortByString .= ', ';
         }
      }
   }
}


and i changed it to this:

/** 
    * Sets up a column to sort by
    */
   public function sortByMultiple() {
      $args=func_get_args();
      $this->sortByString = implode(', ', $args);
      for ($i = 0; $i < count($args); $i++) {
         $this->sortByString .= $args[$i];
         if (($i + 1) < count($args)) { 
            $this->sortByString .= ', ';
         }
      }
   }
}


but i'm still seeing this error when i load a page.

I had just upgraded C5 to 5.52

Can anyone tell me what i need to do to rectify this so my pages link again?

thanks for looking

 
andrew replied on at Permalink Reply
andrew
The code that you showed at the beginning actually shouldn't have any problems. I think you might be looking in the wrong folder. If you updated concrete5 using the built-in updater, make sure you look in updates/concrete5.5.2/concrete/libraries/item_list.php (as opposed to concrete/libraries/item_list.php).