cphalcon
cphalcon copied to clipboard
[BUG]Phalcon\Mvc\Router\Annotations::getResources
I tested it with Phalcon 1.3.0
When there is no added resources to Phalcon\Mvc\Router\Annotations method getResources returns NULL instead of empty array()
Please fix it or change documentation. Now documention give this information:(http://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_Router_Annotations.html)
public array getResources ()
Return the registered resources
Example code to reproduce:
<?php
$router = new \Phalcon\Mvc\Router\Annotations();
var_dump($router->gerResources()) // NULL
$router->addResource('Index', '/');
var_dump($router->gerResources()) // array
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Fixed in Phalcon 2.0.4 (2.0.x branch)