Commit fb545897 authored by catch's avatar catch
Browse files

Issue #3238452 by alexpott: Exception messages must default to an empty string...

Issue #3238452 by alexpott: Exception messages must default to an empty string not a NULL for PHP 8.1
parent 1d75ddb3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@
 */
class RowCountException extends \RuntimeException implements DatabaseException {

  public function __construct($message = NULL, $code = 0, \Exception $previous = NULL) {
    if (!isset($message)) {
  public function __construct($message = '', $code = 0, \Exception $previous = NULL) {
    if (empty($message)) {
      $message = "rowCount() is supported for DELETE, INSERT, or UPDATE statements performed with structured query builders only, since they would not be portable across database engines otherwise. If the query builders are not sufficient, set the 'return' option to Database::RETURN_AFFECTED to get the number of affected rows.";
    }
    parent::__construct($message, $code, $previous);
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class CacheableAccessDeniedHttpException extends AccessDeniedHttpException imple
  /**
   * {@inheritdoc}
   */
  public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
  public function __construct(CacheableDependencyInterface $cacheability, $message = '', \Exception $previous = NULL, $code = 0) {
    $this->setCacheability($cacheability);
    parent::__construct($message, $previous, $code);
  }
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class CacheableBadRequestHttpException extends BadRequestHttpException implement
  /**
   * {@inheritdoc}
   */
  public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
  public function __construct(CacheableDependencyInterface $cacheability, $message = '', \Exception $previous = NULL, $code = 0) {
    $this->setCacheability($cacheability);
    parent::__construct($message, $previous, $code);
  }
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class CacheableConflictHttpException extends ConflictHttpException implements Ca
  /**
   * {@inheritdoc}
   */
  public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
  public function __construct(CacheableDependencyInterface $cacheability, $message = '', \Exception $previous = NULL, $code = 0) {
    $this->setCacheability($cacheability);
    parent::__construct($message, $previous, $code);
  }
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class CacheableGoneHttpException extends GoneHttpException implements CacheableD
  /**
   * {@inheritdoc}
   */
  public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
  public function __construct(CacheableDependencyInterface $cacheability, $message = '', \Exception $previous = NULL, $code = 0) {
    $this->setCacheability($cacheability);
    parent::__construct($message, $previous, $code);
  }
Loading