Needlworks / Textcube

Textcube : Brand yourself! / Personalized web publishing platform with multi-user support
http://www.textcube.org
Other
207 stars 55 forks source link

mysqli extension만 on 되어 있을 경우 버그 #1832

Closed Joungkyun closed 8 years ago

Joungkyun commented 8 years ago

시스템에 mysql extension이 비활성 되어 있고, mysqli만 활성 되어 있을 경우 동작 버그

mysqli adapter에서 MYSQL constant를 사용하고 있어서 발생하는 문제. 1.10.7 까지 존재함.. 업데이트 마다 귀찮아서 결국 보고함 --;

diff -urNp my.orig/framework/data/MySQLi/Adapter.php my/framework/data/MySQLi/Adapter.php
--- my.orig/framework/data/MySQLi/Adapter.php   2015-10-07 00:13:14.492965878 +0900
+++ my/framework/data/MySQLi/Adapter.php    2015-10-07 00:10:53.307841000 +0900
@@ -130,11 +130,11 @@ class DBAdapter implements IAdapter {
    }

    public static function queryCell($query, $field = 0, $useCache=true) {
-       $type = MYSQL_BOTH;
+       $type = MYSQLI_BOTH;
        if (is_numeric($field)) {
-           $type = MYSQL_NUM;
+           $type = MYSQLI_NUM;
        } else {
-           $type = MYSQL_ASSOC;
+           $type = MYSQLI_ASSOC;
        }

        if( $useCache ) {
@@ -331,12 +331,12 @@ class DBAdapter implements IAdapter {
    public static function __queryType($type) {
        switch(strtolower($type)) {
            case 'num':
-               return MYSQL_NUM;
+               return MYSQLI_NUM;
            case 'assoc':
-               return MYSQL_ASSOC;
+               return MYSQLI_ASSOC;
            case 'both':
            default:
-               return MYSQL_BOTH;
+               return MYSQLI_BOTH;
        }
    }
inureyes commented 8 years ago

감사합니다!