소스 검색

[HttpKernel] Catch exception when SQLite profiler storage fails to cleanup

ornicar 14 년 전
부모
커밋
4252680ccf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php

+ 1 - 1
src/Symfony/Component/HttpKernel/Profiler/SQLiteProfilerStorage.php

@@ -94,11 +94,11 @@ class SQLiteProfilerStorage implements ProfilerStorageInterface
         );
         try {
             $this->exec($db, 'INSERT INTO data (token, data, ip, url, time, created_at) VALUES (:token, :data, :ip, :url, :time, :created_at)', $args);
+            $this->cleanup();
             $status = true;
         } catch (\Exception $e) {
             $status = false;
         }
-        $this->cleanup();
         $this->close($db);
 
         return $status;