"^demon" changed the status of MediaWiki.r104518 to "fixme" and commented it. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/104518#c27053
Old Status: new > New Status: fixme Commit summary for MediaWiki.r104518: remove unnecessary dom parsing ^demon's comment: $returnToVal = $wgRequest->getVal( 'returnto' ); $returnto = ( !empty ( $returnToVal ) ) ? '&returnto=' . wfUrlencode( $returnToVal ) : ''; self::$wsLoginFormAction = self::$title->getLocalURL( 'action=submitlogin&type=login' . $returnto ); No need for empty() here, getVal() will return null so you can just do $returnto = $returnToVal ? ... Although like Niklas says above, you should probably just use the key=>value array for getLocalUrl() Similar situation with $userlogin--you really don't need empty() here. Quoting the [[Manual:Coding conventions#PHP pitfalls|coding conventions]]: :"empty() is inverted conversion to boolean with error suppression. Only use it when you really want to suppress errors. Otherwise just use !. Do not use it to test if an array is empty, unless you simultaneously want to check if the variable is unset." _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
