]> 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:50 +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 d72960101f010f8493914940be942bd6864e4749..e5c59bacdc50245a7db078b88510a4a38258a4a5 100644 (file)
@@ -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;