X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCommentStore.php;h=6b94d58e6cf430d577588fd24247171e614ce53a;hb=23b7f3bbd553183a21d785bae175249efad5ee5d;hp=8447b2c7971ffe29df7921f73329efb0be999353;hpb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CommentStore.php b/includes/CommentStore.php index 8447b2c797..6b94d58e6c 100644 --- a/includes/CommentStore.php +++ b/includes/CommentStore.php @@ -34,7 +34,7 @@ class CommentStore { * Maximum length of a comment in UTF-8 characters. Longer comments will be truncated. * @note This must be at least 255 and not greater than floor( MAX_COMMENT_LENGTH / 4 ). */ - const COMMENT_CHARACTER_LIMIT = 1000; + const COMMENT_CHARACTER_LIMIT = 500; /** * Maximum length of a comment in bytes. Longer comments will be truncated. @@ -134,7 +134,7 @@ class CommentStore { /** * Compat method allowing use of self::newKey until removed. * @param string|null $methodKey - * @throw InvalidArgumentException + * @throws InvalidArgumentException * @return string */ private function getKey( $methodKey = null ) { @@ -261,7 +261,7 @@ class CommentStore { private function getCommentInternal( IDatabase $db = null, $key, $row, $fallback = false ) { $row = (array)$row; if ( array_key_exists( "{$key}_text", $row ) && array_key_exists( "{$key}_data", $row ) ) { - $cid = isset( $row["{$key}_cid"] ) ? $row["{$key}_cid"] : null; + $cid = $row["{$key}_cid"] ?? null; $text = $row["{$key}_text"]; $data = $row["{$key}_data"]; } elseif ( $this->stage === MIGRATION_OLD ) {