From 38dab3490a2cab5779e71c5508974a9a54dbb254 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sun, 1 Sep 2013 20:00:03 +0200 Subject: [PATCH] Fixed type of db\Exception::$errorInfo type is array in PHP documentation --- framework/yii/db/Exception.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/yii/db/Exception.php b/framework/yii/db/Exception.php index 9339211..25ae39f 100644 --- a/framework/yii/db/Exception.php +++ b/framework/yii/db/Exception.php @@ -16,19 +16,19 @@ namespace yii\db; class Exception extends \yii\base\Exception { /** - * @var mixed the error info provided by a PDO exception. This is the same as returned + * @var array the error info provided by a PDO exception. This is the same as returned * by [PDO::errorInfo](http://www.php.net/manual/en/pdo.errorinfo.php). */ - public $errorInfo; + public $errorInfo = array(); /** * Constructor. * @param string $message PDO error message - * @param mixed $errorInfo PDO error info + * @param array $errorInfo PDO error info * @param integer $code PDO error code * @param \Exception $previous The previous exception used for the exception chaining. */ - public function __construct($message, $errorInfo = null, $code = 0, \Exception $previous = null) + public function __construct($message, $errorInfo = array(), $code = 0, \Exception $previous = null) { $this->errorInfo = $errorInfo; parent::__construct($message, $code, $previous);