Project

General

Profile

Actions

Bug #103538

open

A non-numeric value encountered GraphicalFunctions::getImageScale

Added by Rafał Jania about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Image Cropping
Target version:
-
Start date:
2024-04-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

ErrorException Warning: A non-numeric value encountered
/public/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php in TYPO3\CMS\Core\Imaging\GraphicalFunctions::getImageScale at line 2385

Both $w and $h values could be passed with 'c' letter, then

$h = (int)$h;

doesn't work and the code in line 2385 fails
$info[0] = (int)ceil($info[0] * ($h / $info[1]);

GraphicalFunctions::getImageScale function called with parameters

h 254c
info [
   2000, 
   663, 
   jpg, 
   <filepath>
]
options    {
   maxH: 254c, 
   maxW: 338c, 
   noScale: null
}
w 0

In template:
<f:image image="{references.0}" alt="{title}" maxWidth="338c" maxHeight="254c" title="{title}" />

No data to display

Actions

Also available in: Atom PDF