Overview
Comment:Fix: "Empty source file argument"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 0f193d24e8368dc986f1c38402f9d01a71e4b9b2
User & Date: bohwaz on 2020-09-08 18:35:30
Other Links: manifest | tags
Context
2020-09-08
18:36
Exiger que le code OTP fasse 6 caractères check-in: 14198574ed user: bohwaz tags: trunk, stable
18:35
Fix: "Empty source file argument" check-in: 0f193d24e8 user: bohwaz tags: trunk, stable
2020-09-03
14:21
Ne pas créer une erreur système si c'est juste une erreur utilisateur check-in: 6d40ab1ba5 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Fichiers.php from [d254644356] to [b62209a8ff].

543
544
545
546
547
548
549
550
551


552
553
554

555
556
557
558
559
560
561
543
544
545
546
547
548
549


550
551
552
553

554
555
556
557
558
559
560
561







-
-
+
+


-
+







		}

		$is_image = preg_match('/^image\/(?:png|jpe?g|gif)$/', $type);

		// Check that it's a real image
		if ($is_image) {
			try {
				if ($path && null !== $content) {
					$i = Image::createFromBlob($bytes);
				if ($path && !$content) {
					$i = new Image($path);
				}
				else {
					$i = new Image($path);
					$i = Image::createFromBlob($bytes);
				}

				unset($i);
			}
			catch (\RuntimeException $e) {
				throw new UserException('Fichier image invalide');
			}