Issues

ZF-175: cacheDir requires trailing slash

Issue Type: Improvement Created: 2006-06-30T10:41:49.000+0000 Last Updated: 2007-07-05T14:43:12.000+0000 Status: Resolved Fix version(s): - 0.1.5 (11/Jul/06)

Reporter: Darby Felton (darby) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:

Description

Improve Zend_Cache so that cacheDir option operates properly whether a trailing slash is included or not.

Comments

Posted by Simon Mundy (peptolab) on 2006-06-30T23:25:08.000+0000

Hope I'm not being too pedantic, but wouldn't it be cleaner to replace:

$last = substr($value, -1, 1); if (($last != '/') and ($last != '\')) { $value = $value . '/'; }

with

$value = rtrim($value, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;

...and that way you're letting PHP take care of the OS-specific separator

Posted by Fabien MARTY (fab) on 2006-07-01T02:50:06.000+0000

fixed on CVS (thanks)

I changed some other '/' into DIRECTORY_SEPARATOR. If you have a windows test platform, may you check if it's ok ? (i have only linux boxes)

thanks

Have you found an issue?

See the Overview section for more details.

Copyright

© 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.

Contacts