When you have `ModeArray` in your list of EXIF fields to extract from the photo:

```
$conf['show_exif_fields'] = array(
'exif_field_Make'       => 'Make',
'exif_field_Model'       => 'Model',
'exif_field_ExposureTime'     => 'ExposureTime',
'exif_field_FocalLength'     => 'FocalLength', 
'exif_field_FNumber'       => 'FNumber',
'exif_field_ModeArray'       => 'ModeArray',
);
```

The `ModeArray` is an array, obviously, and it breaks PHP code because `strip_tags` breaks on an array with PHP 8:

> Fatal error:  Uncaught TypeError: strip_tags(): Argument #1 ($string) must be of type string, array given in include/functions_metadata.inc.php:190
> 
> Stack trace:
> #0 include/functions_metadata.inc.php(190): strip_tags()
> #1 include/picture_metadata.inc.php(24): get_exif_data()
> #2 picture.php(1014): include('...')
> #3 {main}
>   thrown in include/functions_metadata.inc.php on line 190
[PHP 8.x] exif ModeArray field breaks picture page
This is a GitHub Issue
repo:Piwigo
owner:Piwigo
Title : [PHP 8.x] exif ModeArray field breaks picture page
Issue date:

--- start body ---
When you have `ModeArray` in your list of EXIF fields to extract from the photo:

```
$conf['show_exif_fields'] = array(
'exif_field_Make'       => 'Make',
'exif_field_Model'       => 'Model',
'exif_field_ExposureTime'     => 'ExposureTime',
'exif_field_FocalLength'     => 'FocalLength', 
'exif_field_FNumber'       => 'FNumber',
'exif_field_ModeArray'       => 'ModeArray',
);
```

The `ModeArray` is an array, obviously, and it breaks PHP code because `strip_tags` breaks on an array with PHP 8:

> Fatal error:  Uncaught TypeError: strip_tags(): Argument #1 ($string) must be of type string, array given in include/functions_metadata.inc.php:190
> 
> Stack trace:
> #0 include/functions_metadata.inc.php(190): strip_tags()
> #1 include/picture_metadata.inc.php(24): get_exif_data()
> #2 picture.php(1014): include('...')
> #3 {main}
>   thrown in include/functions_metadata.inc.php on line 190
--- end body ---

The issue arises from the handling of the `ModeArray` EXIF field, which is an array. When the code attempts to process this array with the `strip_tags` function, it results in a TypeError in PHP 8, as `strip_tags` expects a string input. This can lead to application crashes, but it does not constitute a security vulnerability as it is a type handling issue rather than an exploit or attack vector.