mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
N°8796 - Add PHP code style validation in iTop and extensions - format whole code base
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
@@ -38,12 +39,12 @@ class PreferencesController extends AbstractController
|
||||
$sUserPicturesFolder = 'images/user-pictures/';
|
||||
$sImageAbsPath = utils::RealPath(APPROOT.$sUserPicturesFolder.$sImageFilename, APPROOT.$sUserPicturesFolder);
|
||||
$sImageAbsUrl = utils::GetAbsoluteUrlAppRoot().$sUserPicturesFolder.$sImageFilename;
|
||||
|
||||
|
||||
// Check if we're still in the right folder
|
||||
if($sImageAbsPath === false){
|
||||
if ($sImageAbsPath === false) {
|
||||
throw new CoreUnexpectedValue('Error while updating user image, invalid image path "'.$sUserPicturesFolder.$sImageFilename.'"');
|
||||
}
|
||||
|
||||
|
||||
// Check file can be read
|
||||
$sImageData = file_get_contents($sImageAbsPath);
|
||||
if (false === $sImageData) {
|
||||
|
||||
Reference in New Issue
Block a user