Differences From Artifact [245dbef1e2]:

To Artifact [04d7bcf61a]:


583
584
585
586
587
588
589



590
591
592
593
594
595
596
597
					$hash = sha1($content);
					$size = strlen($content);
				}

				unset($i);
			}
			catch (\RuntimeException $e) {



				throw $e;
				throw new UserException('Fichier image invalide');
			}
		}

		$db = DB::getInstance();

		$db->begin();







>
>
>
|







583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
					$hash = sha1($content);
					$size = strlen($content);
				}

				unset($i);
			}
			catch (\RuntimeException $e) {
				if (strstr($e->getMessage(), 'No suitable image library found')) {
					throw new UserException('Le serveur n\'a aucune bibliothèque de gestion d\'image installée, et ne peut donc pas accepter les images. Installez Imagick ou GD.');
				}

				throw new UserException('Fichier image invalide');
			}
		}

		$db = DB::getInstance();

		$db->begin();