Преглед на файлове

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