Browse Source

Set undefined vars, remove unused vars nad code that cannot be reached.

Matthias Gutjahr 8 years ago
parent
commit
dca8b5555d

+ 2 - 2
php/access/Guest.php

@@ -33,7 +33,7 @@ class Guest extends Access {
 
 			# Error
 			default:					exit('Error: Function not found! Please check the spelling of the called function.');
-										return false; break;
+										break;
 
 		}
 
@@ -177,4 +177,4 @@ class Guest extends Access {
 
 }
 
-?>
+?>

+ 1 - 1
php/modules/Album.php

@@ -195,7 +195,7 @@ class Album extends Module {
 		# Execute query
 		$albums = $this->database->query($query);
 		if (!$albums) {
-			Log::error($database, __METHOD__, __LINE__, 'Could not get all albums (' . $database->error . ')');
+			Log::error($this->database, __METHOD__, __LINE__, 'Could not get all albums (' . $this->database->error . ')');
 			exit('Error: ' . $this->database->error);
 		}
 

+ 1 - 0
php/modules/Database.php

@@ -277,6 +277,7 @@ if(!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
 		# This avoids problems with placeholders in user-input
 		# $skip = Number of placeholders which need to be skipped
 		$skip	= 0;
+		$temp   = '';
 		$num	= array(
 			'placeholder'	=> substr_count($query, '?'),
 			'data'			=> count($data)

+ 0 - 1
php/modules/Import.php

@@ -11,7 +11,6 @@ class Import extends Module {
 
 	private $database	= null;
 	private $settings	= null;
-	private $albumIDs	= null;
 
 	public function __construct($database, $plugins, $settings) {
 

+ 1 - 6
php/modules/Photo.php

@@ -486,8 +486,6 @@ class Photo extends Module {
 
 		if (extension_loaded('imagick')&&$this->settings['imagick']==='1') {
 
-			$rotateImage = 0;
-
 			switch ($info['orientation']) {
 
 				case 3:
@@ -535,7 +533,6 @@ class Photo extends Module {
 					break;
 
 				case 3:
-					$process	= true;
 					$sourceImg	= imagerotate($sourceImg, -180, 0);
 					break;
 
@@ -552,7 +549,6 @@ class Photo extends Module {
 					break;
 
 				case 6:
-					$process	= true;
 					$sourceImg	= imagerotate($sourceImg, -90, 0);
 					$newWidth	= $info['height'];
 					$newHeight	= $info['width'];
@@ -566,7 +562,6 @@ class Photo extends Module {
 					break;
 
 				case 8:
-					$process	= true;
 					$sourceImg	= imagerotate($sourceImg, 90, 0);
 					$newWidth	= $info['height'];
 					$newHeight	= $info['width'];
@@ -1251,4 +1246,4 @@ class Photo extends Module {
 
 }
 
-?>
+?>

+ 1 - 2
php/modules/Plugins.php

@@ -20,7 +20,6 @@ class Plugins implements \SplSubject {
 		if (!isset($files)) return false;
 
 		# Init vars
-		$plugins		= $this;
 		$this->files	= $files;
 
 		# Load plugins
@@ -92,4 +91,4 @@ class Plugins implements \SplSubject {
 
 }
 
-?>
+?>