Michael created this task.
Michael added projects: Wikidata-Campsite (Wikidata-Campsite-Iteration-∞), 
Wikidata, Technical-Debt, wikidata-tech-focus, Code-Health.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  The sonar code health analysis has surfaced a strange piece of code 
<https://sonarcloud.io/project/issues?id=mediawiki-extensions-Wikibase&open=AWt1uNEeBeEiCS_y_c0G&severities=MAJOR&statuses=OPEN&types=BUG>:
  
  name=MatchingTermsLookupSearchInteractor.php
    if ( count( $matchedTermIndexEntries ) > $limit ) {
        array_slice( $matchedTermIndexEntries, 0, $limit, true );
    }
  
  PHP's array_slice <https://www.php.net/manual/en/function.array-slice.php> 
does not mutate its arguments but instead returns a value. That returned value 
is not used here, so something is wrong.
  
  [ ] Figure out what is going on. Do we actually have a bug here that can be 
somehow seen in production?
  [ ] Try to understand why there are no tests failing (are there none for that 
feature?)
  [ ] Fix it (either remove it if it is not used or fix it and write a test for 
it if it is an actual bug in prod)

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

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

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

To: guergana.tzatchkova, Michael
Cc: Addshore, Aklapper, Michael, Demian, Iflorez, darthmon_wmde, alaa_wmde, 
DannyS712, Nandana, kostajh, Lahi, Gq86, Pablo-WMDE, GoranSMilovanovic, 
Jayprakash12345, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Jonas, 
Izno, Wikidata-bugs, aude, Dinoguy1000, Lydia_Pintscher, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to