The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I get a error in this function first
#1
Hi Everybody,

I get a error in function first in DB Class.

public function first(){
return $this->results()[0];
}

I don't understand this sintaxe: return $this->results()[0];

Is the [0] a paramter?

Help me please
Thanks

  Reply
#2
Help me please

My doubt is:

If the [0] means the element 0 of array resulting of method 'results' how can I get this with other way?

Thanks
  Reply
#3
you need to give a bit more info, where are you seeing the error? what changes have you made etc etc
  Reply
#4
Hi Everybody,

After a few hours banging my head against the wall, I tryed this and it's worked:

return current( $this->results() );


My PHP is 5.3.27 on server production.

If anyone had the same problem, try it.

Thanks

  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)