r87769 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87768‎ | r87769 | r87770 >
Date:20:49, 9 May 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
More silly ternary true : false fixes
Modified paths:
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)
  • /trunk/phase3/maintenance/fuzz-tester.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/fuzz-tester.php
@@ -2472,7 +2472,7 @@
24732473
24742474 curl_close ( $ch );
24752475
2476 - $valid = ( strpos( $result, "Failed validation" ) === false ? true : false );
 2476+ $valid = ( strpos( $result, "Failed validation" ) === false );
24772477
24782478 return array( $valid, $result );
24792479 }
Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -1046,7 +1046,7 @@
10471047 $this->tablename = $info['TABLE_NAME'];
10481048 $this->default = $info['COLUMN_DEFAULT'];
10491049 $this->max_length = $info['CHARACTER_MAXIMUM_LENGTH'];
1050 - $this->nullable = ( strtolower( $info['IS_NULLABLE'] ) == 'no' ) ? false:true;
 1050+ $this->nullable = !( strtolower( $info['IS_NULLABLE'] ) == 'no' );
10511051 $this->type = $info['DATA_TYPE'];
10521052 }
10531053

Comments

#Comment by Nikerabbit (talk | contribs)   06:05, 10 May 2011

Why not

$this->nullable = strtolower( $info['IS_NULLABLE'] ) != 'no';
#Comment by Reedy (talk | contribs)   11:43, 10 May 2011

It's better than it was ;)

Status & tagging log