浏览代码

logger pdo exception handling workaround

goodygh 2 年之前
父节点
当前提交
9752313d24
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      data/web/inc/functions.inc.php

+ 3 - 2
data/web/inc/functions.inc.php

@@ -526,8 +526,9 @@ function logger($_data = false) {
           ':remote' => get_remote_ip()
           ':remote' => get_remote_ip()
         ));
         ));
       }
       }
-      catch (Exception $e) {
-        // Do nothing
+      catch (PDOException $e) {
+        # handle the exception here, as the exception handler function results in a white page
+        error_log($e->getMessage(), 0);
       }
       }
     }
     }
   }
   }