Kaynağa Gözat

Profiler session import fixed.

Denis Klementjev 13 yıl önce
ebeveyn
işleme
fd4d241b17

+ 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).');
         }