mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
"Fixes #4377, Folder class bug for non-existent path"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6602 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
fa787aa82b
commit
657c28403a
2 changed files with 10 additions and 5 deletions
|
@ -110,8 +110,10 @@ class Folder extends Object{
|
|||
if (!$this->isAbsolute($path)) {
|
||||
$path = realpath($path);
|
||||
}
|
||||
if (!empty($path)) {
|
||||
$this->cd($path);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return current path.
|
||||
*
|
||||
|
|
|
@ -117,6 +117,9 @@ class FolderTest extends UnitTestCase {
|
|||
$result = $Folder->delete();
|
||||
$this->assertTrue($result);
|
||||
|
||||
$Folder =& new Folder('non-existent');
|
||||
$result = $Folder->pwd();
|
||||
$this->assertNull($result);
|
||||
}
|
||||
|
||||
function testRealPathForWebroot() {
|
||||
|
|
Loading…
Reference in a new issue