r87939 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87938‎ | r87939 | r87940 >
Date:23:30, 12 May 2011
Author:hashar
Status:ok
Tags:
Comment:
fix strict error: is_a -> instanceof

is_a is deprecated and trigger a strict error. It made a callback
expecting json to receive an HTML formatted error. The end result
was that editing was not possible with strict setting.
Modified paths:
  • /trunk/extensions/InlineEditor/InlineEditorMarking.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/InlineEditor/InlineEditorMarking.class.php
@@ -203,7 +203,7 @@
204204 * @return bool
205205 */
206206 public function equals( InlineEditorPiece $piece, array $ignoreClasses = array() ) {
207 - if( is_a( $piece, 'InlineEditorMarking' ) ) {
 207+ if( $piece instanceof InlineEditorMarking ) {
208208 $classesA = array_diff( $this->classes, $ignoreClasses );
209209 $classesB = array_diff( $piece->classes, $ignoreClasses );
210210 $diffA = array_diff( $classesA, $classesB);

Status & tagging log