Welcome Guest, Not a member yet? Register   Sign In
Tilde(~) in Path Breaks CI4 (used in iCloud Drive Path)
#2

Does anyone have an idea of how we can work around this?

The error occurs in the final line of
/Users/moo/Desktop/folder_with_a_tilde~/ci4b1/vendor/codeigniter4/framework/system/Config/Config.php
in createClass where we are creating a new class instance using the name that was passed in.

vendor/codeigniter4/framework/system/Config/Config::createClass(string $name):
Code:
    /**
     * Find configuration class and create instance
     *
     * @param string $name Classname
     *
     * @return mixed|null
     */
    private static function createClass(string $name)
    {

       if (class_exists($name))
        {
            return new $name();
        }

        $locator = Services::locator();

       $file    = $locator->locateFile($name, 'Config');

        if (empty($file))
        {
            return null;
        }

        $name = $locator->getClassname($file);

        if (empty($name))
        {
            return null;
        }
               CODE DIES HERE:
        return new $name();
    }

(Using CodeIgniter since 1.x)
Reply


Messages In This Thread
RE: Tilde(~) in Path Breaks CI4 (used in iCloud Drive Path) - by jasonzig - 03-05-2019, 03:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB