问题描述:

I am doing a simple find to select a opponent for a game:

return $this->find('first'....

As long as I find a player, the function returns the array of results...

But as soon as I get no results, the array is empty, I get the following error message:

Warning (2): strlen() expects parameter 1 to be string, array given [CORE\Cake\Network\CakeResponse.php, line 496]

Notice (8): Array to string conversion [CORE\Cake\Network\CakeResponse.php, line 525]

Array

I can't really understand why I get this error and where it is based.

Any ideas?

相关阅读:
Top