OSDN Git Service

The variable for 'defined' function need to be packed with quotation.
authorsakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Thu, 31 Mar 2011 13:35:26 +0000 (13:35 +0000)
committersakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Thu, 31 Mar 2011 13:35:26 +0000 (13:35 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1198 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/sql/mysql.php
utf8/nucleus/libs/sql/pdo.php

index 10cc776..25685ab 100755 (executable)
@@ -72,7 +72,7 @@ if (function_exists('mysql_query') && !function_exists('sql_fetch_assoc'))
                mysql_select_db($MYSQL_DATABASE) or startUpError('<p>Could not select database: ' . mysql_error() . '</p>', 'Connect Error');
 
 // <add for garble measure>
-               if (defined(_CHARSET)){
+               if (defined('_CHARSET')){
                        $charset  = _CHARSET;
                }else{
                        $resource = sql_query("show variables LIKE 'character_set_database'");
index 9f6f61b..1ac7524 100755 (executable)
@@ -194,7 +194,7 @@ if (!function_exists('sql_fetch_assoc'))
                        
 // <add for garble measure>
                        if (strpos($MYSQL_HANDLER[1], 'mysql') === 0) {
-                               if (defined(_CHARSET)){
+                               if (defined('_CHARSET')){
                                        $charset  = _CHARSET;
                                }else{
                                        $resource = $SQL_DBH->query("show variables LIKE 'character_set_database'");