[Filesystem] Fixed warnings in makePathRelative().
This commit is contained in:
parent
f5f5c21228
commit
100e97ebe7
@ -180,7 +180,7 @@ class Filesystem
|
||||
{
|
||||
// Find for which character the the common path stops
|
||||
$offset = 0;
|
||||
while ($startPath[$offset] === $endPath[$offset]) {
|
||||
while (isset($startPath[$offset]) && isset($endPath[$offset]) && $startPath[$offset] === $endPath[$offset]) {
|
||||
$offset++;
|
||||
}
|
||||
|
||||
|
@ -444,7 +444,8 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
$paths = array(
|
||||
array('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'),
|
||||
array('var/lib/symfony/', 'var/lib/symfony/src/Symfony/Component', '../../../'),
|
||||
array('/usr/lib/symfony/', '/var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/')
|
||||
array('/usr/lib/symfony/', '/var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'),
|
||||
array('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/', '../src/Symfony/'),
|
||||
);
|
||||
|
||||
// fix directory separator
|
||||
|
Reference in New Issue
Block a user