cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[BUG]Phalcon\Mvc\Router\Annotations::getResources

Open nexik opened this issue 12 years ago • 1 comments

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.

nexik avatar Mar 01 '14 11:03 nexik

Fixed in Phalcon 2.0.4 (2.0.x branch)

andresgutierrez avatar Jun 25 '15 03:06 andresgutierrez