actually be strings which may not convert 1:1 if passed
to MySQL as numbers.
fix for Bug 255: Number articles on Special:Newpages
http://bugzilla.wikipedia.org/show_bug.cgi?id=255
function addQuotes( $s ) {
if ( is_null( $s ) ) {
$s = 'NULL';
- } else if ( !is_numeric( $s ) ) {
+ } else {
+ # This will also quote numeric values. This should be harmless,
+ # and protects against weird problems that occur when they really
+ # _are_ strings such as article titles and string->number->string
+ # conversion is not 1:1.
$s = "'" . $this->strencode( $s ) . "'";
}
return $s;