joomla/joomla-platform — pull request #1609 by dongilbert (2012-10-17 13:50:30+00:00)
Title: Fix JTable::addIncludePath - includes tests

When passed paths that already existed, `JTable::addIncludePath` would still add them to the internal `$_includePaths` variable. This occurred due to the fact that before `!in_array($path, self::$_includePaths)` ran, `$path` was converted to an array. This was to facilitate the ability to pass either an array of paths or a path string. However, that caused the `in_array` function to check `$_includePaths` as a multi-dimensional array, when it is meant to only be a single-dimensional array. This code fixes that behavior. I've included tests as well.