Welcome Guest, Not a member yet? Register   Sign In
possible error in _ci_load_class code from system//libraries/Loader.php
#1

[eluser]Peter Drinnan[/eluser]
I'm looking at the code for getting the subdir and the use of the implode function doesn't make sense:

$subdir = '';

if (strpos($class, '/') !== FALSE)
{
// explode the path so we can separate the filename from the path
$x = explode('/', $class);

// Reset the $class variable now that we know the actual filename
$class = end($x);

// Kill the filename from the array
unset($x[count($x)-1]);

// Glue the path back together, sans filename
$subdir = implode($x, '/').'/';

}

When using the PHP implode function, the delimiter should be the first parameter and the array the second, but in the code above that is reversed. Is there something I'm missing here or is this an error in the code?

Thanks.


Messages In This Thread
possible error in _ci_load_class code from system//libraries/Loader.php - by El Forum - 07-11-2010, 03:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB