skeeks\cms\checks\MysqlBugVersionCheck::run PHP Method

run() public method

public run ( )
    public function run()
    {
        $MySql_vercheck_min = "5.0.0";
        $command = \Yii::$app->db->createCommand("SELECT VERSION() as r");
        $founded = $command->queryOne();
        $version = trim($founded["r"]);
        preg_match("#[0-9]+\\.[0-9]+\\.[0-9]+#", $version, $arr);
        $version = $arr[0];
        if (version_compare($version, $MySql_vercheck_min, '<')) {
            $this->addError(\Yii::t('skeeks/cms', 'MySQL installed version {cur}, {req} is required', ['cur' => $version, 'req' => $MySql_vercheck_min]));
        }
        if ($version == '4.1.21' || $version == '5.1.34' || $version == '5.0.41') {
            $this->addError(\Yii::t('skeeks/cms', 'Problem version of the database') . ": " . trim($founded["r"]));
        }
        if (!$this->errorMessages) {
            $this->addSuccess(\Yii::t('skeeks/cms', 'The current version of the database') . ": " . trim($founded["r"]));
        }
        return true;
    }
MysqlBugVersionCheck