Replace api_get_path with __DIR__

pull/2487/head
jmontoyaa 9 years ago
parent 9255e560e8
commit bcab86502e
  1. 2
      app/Migrations/Schema/V110/Version20151214170800.php

@ -39,7 +39,7 @@ class Version20151214170800 extends AbstractMigrationChamilo
foreach ($answers as $answer) {
// Recover the real image size to recalculate coordinates
$imagePath = api_get_path(SYS_PATH) . "courses/{$answer['directory']}/document/images/{$answer['picture']}";
$imagePath = __DIR__ . "/../../../../courses/{$answer['directory']}/document/images/{$answer['picture']}";
if (!file_exists($imagePath)) {
error_log("Migration: Image does not exists: $imagePath");
continue;

Loading…
Cancel
Save