在null上错误调用成员函数getAttribute()

时间:2019-05-09 17:21:22

标签: php yii2

错误 在null上调用成员函数getAttribute()

 /**
     * Checks the ability to use fractional seconds.
     *
     * @return bool
     * @see https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
     */
    private function supportsFractionalSeconds()
    {
        $version = $this->db->getSlavePdo()->getAttribute(\PDO::ATTR_SERVER_VERSION);
        return version_compare($version, '5.6.4', '>=');

0 个答案:

没有答案