]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix variable name and undefined index notice
authorBartek Przybylski <bart.p.pl@gmail.com>
Sun, 10 Jun 2012 15:25:19 +0000 (17:25 +0200)
committerBartek Przybylski <bart.p.pl@gmail.com>
Sun, 10 Jun 2012 15:25:19 +0000 (17:25 +0200)
apps/gallery/templates/index.php
lib/image.php

index e761cb54725c53fe953b60f8a9f1c40db064dfc5..fd83490d60cac9401f69d417a71e350ea81d029c 100644 (file)
@@ -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]);
index f119c99633f20fd830e41b9802d799993a126633..4d1e7aa4bc7affb8aa6df7d3bf4beca130d451c5 100644 (file)
@@ -402,7 +402,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;