if(empty($resource)) {return $emptyText."\n"; } // add this line
$resource = array_values($resource);
I had troubles running Ditto Version: 1.0.2, there is:
if (count($resource) < 1) { return $emptyText."\n"; }
but this count() returns 1 of $resource is false, so I’ve changed it to:
if ((count($resource) < 1) || (!$resource)) { return $emptyText."\n"; }
I’m running PHP 5.x (5.1.2 afaik), so there may have been some minor changes...