Skip to content

Commit

Permalink
Gracefully handle null entries in the array (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil4 authored Apr 29, 2022
1 parent 458b697 commit 568b56c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/PHPExif/Adapter/AdapterAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ public function setOptions(array $options) : AdapterInterface
* Encodes an array of strings into UTF8
*
* @param array|string $data
* @return array
* @return array|string|null
*/
// @codeCoverageIgnoreStart
// this is fine because we use it directly in our tests for Exiftool and Native
public function convertToUTF8($data) : array|string
public function convertToUTF8($data) : array|string|null
{
if (is_array($data)) {
foreach ($data as $k => $v) {
Expand Down

0 comments on commit 568b56c

Please sign in to comment.