Update ActiveRecord.php

fix for https://github.com/yiisoft/yii2/pull/2958