]> granicus.if.org Git - php/commitdiff
tiny optimisation
authorThies C. Arntzen <thies@php.net>
Sat, 1 Jan 2000 16:54:55 +0000 (16:54 +0000)
committerThies C. Arntzen <thies@php.net>
Sat, 1 Jan 2000 16:54:55 +0000 (16:54 +0000)
ext/mysql/php_mysql.c

index 02e68f638af3726e66baab85f1bbd66afe0d989e..916e7898f2ad21963e9907a1e90ecae28271081b 100644 (file)
@@ -1247,9 +1247,9 @@ PHP_FUNCTION(mysql_result)
                }
        }
 
-       return_value->type = IS_STRING;
-
        if (sql_row[field_offset]) {
+               return_value->type = IS_STRING;
+
                if (PG(magic_quotes_runtime)) {
                        return_value->value.str.val = php_addslashes(sql_row[field_offset],sql_row_lengths[field_offset],&return_value->value.str.len,0);
                } else {