source/core/datasystem/file/format/media/image/handler/MGdHandler.php
Remove error control operator '@' on line 25. Open
Open
public function loadJpg($p_sImage)
{
// workaround for: "Invalid SOS parameters for sequential JPEG" - actually ignoring it
ini_set ('gd.jpeg_ignore_warning', 1);
return @imagecreatefromjpeg($p_sImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The parameter $p_sImage is not named in camelCase. Open
Open
public function loadJpg($p_sImage)
{
// workaround for: "Invalid SOS parameters for sequential JPEG" - actually ignoring it
ini_set ('gd.jpeg_ignore_warning', 1);
return @imagecreatefromjpeg($p_sImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $p_sImage is not named in camelCase. Open
Open
public function loadPng($p_sImage)
{
return imagecreatefrompng($p_sImage);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The variable $p_sImage is not named in camelCase. Open
Open
public function loadPng($p_sImage)
{
return imagecreatefrompng($p_sImage);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $p_sImage is not named in camelCase. Open
Open
public function loadJpg($p_sImage)
{
// workaround for: "Invalid SOS parameters for sequential JPEG" - actually ignoring it
ini_set ('gd.jpeg_ignore_warning', 1);
return @imagecreatefromjpeg($p_sImage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}