Project

General

Profile

Actions

Bug #80071

closed

json_encode NAN and INF error in CropVariantCollection.php

Added by Timo Kiefer over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2017-03-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Steps to reproduce:

1. Move a image file into fileadmin/user_upload/
2. Try to select the file in TYPO3-Backend to add it to a content element.

Error:

Oops, an error occurred!

PHP Catchable Fatal Error: Method TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection::__toString() must return a string value in /var/www/typo3_src-8.6.1/typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php line 289

Quick Workaround:

return json_encode(unserialize(str_replace(array('NAN;', 'INF;'), '0;', serialize($cropVariantsAsArray))));

This is not a good solution.. I think the error comes from that the file has no reference in the database?

TYPO3 8.6.1

Thanks,
Timo


Files

Correct_PNG.PNG (59.8 KB) Correct_PNG.PNG No problems with .png David Rellstab, 2017-03-16 09:51
Problem_MP4.PNG (41.1 KB) Problem_MP4.PNG CropArea values NAN with .mp4 David Rellstab, 2017-03-16 09:51
tca_fal_media.txt (3.18 KB) tca_fal_media.txt tca the column David Rellstab, 2017-03-16 09:51

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #80388: ERROR while creating a Reference of a PDFClosed2017-03-22

Actions
Actions

Also available in: Atom PDF