lennerd / vipx-bot-detect

A bot detector written in PHP
MIT License
43 stars 18 forks source link

ConfigCache class fatal error #37

Closed h3rj4n closed 8 years ago

h3rj4n commented 8 years ago

I'm getting the following error trying to enable the cache options:

Catchable fatal error: Object of class Symfony\Component\Config\ConfigCache could not be converted to string in /vendor/vipx/bot-detect/Vipx/BotDetect/BotDetector.php on line 92

It solvable by changing the following (from, to):

        if ($cache->isFresh()) {
            return $this->metadatas = require $cache;
        }

To

        if ($cache->isFresh()) {
            return $this->metadatas = require $cache->getPath();
        }
lennerd commented 8 years ago

Nice catch. Would you like to make a PR for this?

h3rj4n commented 8 years ago

A PR? A patch?

\Edit: Pull Request!! Got it xD

lennerd commented 8 years ago

Kind of. PR means Pull Request. It's one of the main features of Github. More information: https://help.github.com/articles/using-pull-requests/

lennerd commented 8 years ago

Fixed via a6d09f728e19b211aa804e1e09111ef70374cc6a.