summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/gallery/templates/index.php2
-rw-r--r--lib/image.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php
index e761cb54725..fd83490d60c 100644
--- a/apps/gallery/templates/index.php
+++ b/apps/gallery/templates/index.php
@@ -82,7 +82,7 @@ sort($images);
$arr = array();
$tl = new \OC\Pictures\TilesLine();
$ts = new \OC\Pictures\TileStack(array(), '');
-$previous_element = $images[0];
+$previous_element = @$images[0];
for($i = 0; $i < count($images); $i++) {
$prev_dir_arr = explode('/', $previous_element);
$dir_arr = explode('/', $images[$i]);
diff --git a/lib/image.php b/lib/image.php
index d72960101f0..e5c59bacdc5 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -409,7 +409,7 @@ class OC_Image {
default:
// this is mostly file created from encrypted file
- $this->resource = imagecreatefromstring(\OC_Filesystem::file_get_contents(\OC_Filesystem::getLocalPath($newimgpath)));
+ $this->resource = imagecreatefromstring(\OC_Filesystem::file_get_contents(\OC_Filesystem::getLocalPath($imagepath)));
$itype = IMAGETYPE_PNG;
OC_Log::write('core','OC_Image->loadFromFile, Default', OC_Log::DEBUG);
break;