Skip to content

PHP Warning: Array to string conversion - using the fileUpload field #1004

@daUhradone

Description

@daUhradone

PHP Warning: Array to string conversion in /html/typo3-composer/vendor/typo3fluid/fluid/src/Core/ViewHelper/TagBuilder.php line 200

It seems to be connected to the dismantling of the file attributes:
Line 200 is "if(trim ..."

        foreach ($attributeValue as $name => $value) {
              $this->addAttribute($attributeName . '-' . $name, $value, $escapeSpecialCharacters);
          }
      } else {
          if (trim((string)$attributeValue) === '' && $this->ignoreEmptyAttributes) {
              return;
          }
          if ($escapeSpecialCharacters) {
              $attributeValue = htmlspecialchars((string)$attributeValue);

at TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder->addAttribute('value', array('name' => 'IMG_6420.JPG', 'type' => 'image/jpeg', 'error' => 0, 'size' => 5182688, 'tmp_name' => '/tmp/phps3at0y'))

In Production Mode I get:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: strtolower(): Argument #1 ($string) must be of type string, null given | TypeError thrown in file /html/typo3-composer/vendor/in2code/powermail/Classes/Domain/Service/UploadService.php in line 134.

But types are set in Constants or TypoScript

PHP 8.3
TYPO3 12.4.3
powermail 12.3.0

only when I use the fileupload field

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions