r47410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47409‎ | r47410 | r47411 >
Date:02:00, 18 February 2009
Author:demon
Status:deferred (Comments)
Tags:
Comment:
Call static isValidIsbn() statically. Not sure why E_ALL | E_STRICT didn't yell at this.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBooksources.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBooksources.php
@@ -34,7 +34,7 @@
3535 $wgOut->addWikiMsg( 'booksources-summary' );
3636 $wgOut->addHTML( $this->makeForm() );
3737 if( strlen( $this->isbn ) > 0 ) {
38 - if( !$this->isValidIsbn( $this->isbn ) ) {
 38+ if( !self::isValidISBN( $this->isbn ) ) {
3939 $wgOut->wrapWikiMsg( '<div class="error">$1</div>', 'booksources-invalid-isbn' );
4040 }
4141 $this->showList();

Comments

#Comment by Catrope (talk | contribs)   09:16, 18 February 2009

E_ALL | E_STRICT didn't complain because this is not a syntax error: it's perfectly legal to call a static function non-statically (even in other OO languages), it's the other way around that 's forbidden.

#Comment by 😂 (talk | contribs)   16:45, 18 February 2009
  • facepalm* Duh.

Status & tagging log