Undefined method 'array_map'

  • Thread starter Thread starter FoxSecrets
  • Start date Start date

FoxSecrets

Guest
Member
I'm getting error "undefined method array_map" in my function.
Should I import some class in order to work? Or any special xf tag to loop in query results?

PHP
Code:

Code:

Code:
public function actionExpire()
    {
        $books = $this->finder('FOX\Books:Book')->where('status', 'valid')->fetch();
        $books->array_map(
            function($book) {
                if ($book->expiration < time())
                {
                    $book->status = 'expired'...
Read more

Continue reading...
 
Top