panlumeng 3 years ago
parent
commit
f5d8f9d75e
2 changed files with 6 additions and 2 deletions
  1. 5 1
      thinkphp/library/think/App.php
  2. 1 1
      thinkphp/library/think/db/Connection.php

+ 5 - 1
thinkphp/library/think/App.php

@@ -501,7 +501,11 @@ class App
 
         if ($config['app_multi_module']) {
             // 多模块部署
-            $module    = strip_tags(strtolower($result[0] ?: $config['default_module']));
+                     if($convert){ //增加模块的大小写是否自动转换的功能
+                           $module    = strip_tags(strtolower($result[0] ?: $config['default_module']));
+                        }else{
+                      $module    = strip_tags($result[0] ?: $config['default_module']);
+                     }
             $bind      = Route::getBind('module');
             $available = false;
 

+ 1 - 1
thinkphp/library/think/db/Connection.php

@@ -117,7 +117,7 @@ abstract class Connection
         PDO::ATTR_CASE              => PDO::CASE_NATURAL,
         PDO::ATTR_ERRMODE           => PDO::ERRMODE_EXCEPTION,
         PDO::ATTR_ORACLE_NULLS      => PDO::NULL_NATURAL,
-        PDO::ATTR_STRINGIFY_FETCHES => false,
+        PDO::ATTR_STRINGIFY_FETCHES => true,
         PDO::ATTR_EMULATE_PREPARES  => false,
     ];