ZF-12552: Zend_Service_Rackspace_Files::getObjects() throws exception when listing pseudo-directories

Issue Type: Bug Created: 2013-03-25T14:21:08.000+0000 Last Updated: 2013-04-05T16:06:53.000+0000 Status: Closed Fix version(s): Reporter: Matt Kynx (kynx) Assignee: None Tags: Related issues: Attachments: - ZF-12552-test.patch


According to the Rackspace docs[1] you should be able to get a listing of pseudo-directories by passing 'delimiter' and 'prefix' params to getObjects, something like:

$cf->getObjects('mycontainer', array('delimiter' => '/', 'prefix' => 'path/to/mydir/');

But if you try this you get a Zend_Service_Rackspace_Files_Exception - "You must pass the name of the object in the array (name)".

The problem is that when listing directories the response contains a 'subdir' element, not a 'name' element. The attached patch allows Zend_Service_Rackspace_Files_Object to deal with this correctly.



Posted by Frank Brückner (frosch) on 2013-03-25T14:24:10.000+0000

Hi Matt, can you also add some unit tests?

Posted by Matt Kynx (kynx) on 2013-03-25T15:22:53.000+0000

Yeah, will do. I'm also trying to track these issues against ZF2 and tend to do tests there... but it's all becoming a bit of a headache :|

Posted by Matt Kynx (kynx) on 2013-03-25T16:29:55.000+0000

Offline test. Not sure how I'd go about writing an online test. Pointers welcome!

Posted by Ralph Schindler (ralph) on 2013-04-05T16:06:53.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.