Lucas_Werkmeister_WMDE claimed this task.
Lucas_Werkmeister_WMDE moved this task from To Do to Doing on the Wikidata-Campsite (Wikidata-Campsite-Iteration-∞) board.
Lucas_Werkmeister_WMDE added a comment.

Apparently, the string length validator now looks like this in production:

Wikibase\Repo\Validators\StringLengthValidator::__set_state(array(
  'minLength' => 1,
  'maxLength' => 
  array (
    'length' => 1500,
  ),
  'measure' => 'mb_strlen',
  'errorCodePrefix' => '',
)),

Because maxLength is an array with a length member instead of a plain integer, the comparison $length > $this->maxLength is now never true, which is why strings of any length are accepted. I’ll try to find out where exactly this is happening.

(Aside: Do we have any place where we collect bugs like this one, which would have been prevented if we had full PHP7 support, including primitive type hints? Just to further motivate the PHP7 transition?)


TASK DETAIL
https://phabricator.wikimedia.org/T154660

WORKBOARD
https://phabricator.wikimedia.org/project/board/3539/

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lea_Lacroix_WMDE, Stashbot, gerritbot, Tarrow, Lucas_Werkmeister_WMDE, Marsupium, Wostr, Addshore, Jheald, Daniel_Mietchen, Arbnos, Cirdan, Liuxinyu970226, thiemowmde, EgonWillighagen, Sebotic, Scott_WUaS, Sadads, Pasleim, Aklapper, Lydia_Pintscher, CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, D3r1ck01, Jonas, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to