소스 검색

Profiler session import fixed.

Denis Klementjev 13 년 전
부모
커밋
fd4d241b17
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

+ 2 - 2
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php

@@ -101,11 +101,11 @@ class ProfilerController extends ContainerAware
         $profiler->disable();
 
         $file = $this->container->get('request')->files->get('file');
-        if (!$file || UPLOAD_ERR_OK !== $file->getError()) {
+        if (empty($file) || UPLOAD_ERR_OK !== $file->getError()) {
             throw new \RuntimeException('Problem uploading the data.');
         }
 
-        if (!$profile = $profiler->import(file_get_contents($file->getPath()))) {
+        if (!$profile = $profiler->import(file_get_contents($file->getPathname()))) {
             throw new \RuntimeException('Problem uploading the data (token already exists).');
         }