spotorm / spot2

Spot v2.x DataMapper built on top of Doctrine's Database Abstraction Layer
http://phpdatamapper.com
BSD 3-Clause "New" or "Revised" License
601 stars 101 forks source link

count(): Parameter must be an array or an object that implements Countable #264

Closed vanvanni closed 6 years ago

vanvanni commented 6 years ago

Warning: count(): Parameter must be an array or an object that implements Countable in D:\xampp\htdocs\xjoeyv\vendor\vlucas\spot2\lib\Config.php on line 192

My Code


        private static $slim;
    private static $blade;

    private static $cfg;
    private static $orm;

    public static function start() {
        self::$slim = new Slim();
        self::$cfg = new Config();
        self::$blade = new BladeInstance("./views", "./cache");
        try {
            self::$cfg->addConnection('mysql', 'mysql://root:@localhost/xjoeyv_r');
        } catch (Exception $exception) {}
        self::$orm = new Locator(self::$cfg);
    }```
FlipEverything commented 6 years ago

Please provide more information about your problem. The code you provided is not enough.

FlipEverything commented 6 years ago

Feel free to reopen this thread if you need further assistance.