joomla/joomla-platform — pull request #1610 by dongilbert (2012-10-17 16:33:26+00:00)
Title: fixing JTable::addIncludePaths and updating unit tests

When passed paths that already exist in the `$_includePaths` array, `JTable::addIncludePath` mistakenly re-adds them. This is due to the fact that before `!in_array($path, self::$_includePaths)` runs, `$path` is converted to an array. This was to facilitate the ability to pass either an array of paths or a path string to the method. However, it also caused the `in_array` function to check `$_includePaths` as a multi-dimensional array, when it is only ever a single-dimensional array. This code fixes that behavior. I've included tests as well.