Browse Source

Fixed type of db\Exception::$errorInfo

type is array in PHP documentation
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
38dab3490a
  1. 8
      framework/yii/db/Exception.php

8
framework/yii/db/Exception.php

@ -16,19 +16,19 @@ namespace yii\db;
class Exception extends \yii\base\Exception 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). * by [PDO::errorInfo](http://www.php.net/manual/en/pdo.errorinfo.php).
*/ */
public $errorInfo; public $errorInfo = array();
/** /**
* Constructor. * Constructor.
* @param string $message PDO error message * @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 integer $code PDO error code
* @param \Exception $previous The previous exception used for the exception chaining. * @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; $this->errorInfo = $errorInfo;
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);

Loading…
Cancel
Save