[php-src] Issue #8408: bug68547.phpt try to build without multibyte decoding support

From: Date: Wed, 20 Apr 2022 14:25:51 +0000
Subject: [php-src] Issue #8408: bug68547.phpt try to build without multibyte decoding support
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241099@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8408 Author: evrinoma ### Description **Description** Hi. I try to build php extension exif from source code and I've got an error Bug #68547 (Exif Header component value check error) [tests/bug68547.phpt] The problem is here The following code: ```php --TEST-- Bug #68547 (Exif Header component value check error) --SKIPIF-- <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php var_dump(exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . 'bug68547.jpg')); ?> ===DONE=== --EXPECTF-- array(12) { ["FileName"]=> string(12) "bug68547.jpg" ["FileDateTime"]=> int(%d) ["FileSize"]=> int(713) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(20) "ANY_TAG, IFD0, WINXP" ["COMPUTED"]=> array(5) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(0) } ["Subject"]=> string(10) "Subjec??.." ["Keywords"]=> string(0) "" ["Author"]=> string(9) "Rui Carmo" ["Comments"]=> string(29) "Comments Line2 Line3 Line4" ["Title"]=> string(8) "Title..." } ===DONE=== ``` Resulted in this output: ``` ---- EXPECTED OUTPUT array(12) { ["FileName"]=> string(12) "bug68547.jpg" ["FileDateTime"]=> int(%d) ["FileSize"]=> int(713) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(20) "ANY_TAG, IFD0, WINXP" ["COMPUTED"]=> array(5) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(0) } ["Subject"]=> string(10) "Subjec??.." ["Keywords"]=> string(0) "" ["Author"]=> string(9) "Rui Carmo" ["Comments"]=> string(29) "Comments Line2 Line3 Line4" ["Title"]=> string(8) "Title..." } ===DONE=== ---- ACTUAL OUTPUT array(12) { ["FileName"]=> string(12) "bug68547.jpg" ["FileDateTime"]=> int(1649760945) ["FileSize"]=> int(713) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(20) "ANY_TAG, IFD0, WINXP" ["COMPUTED"]=> array(5) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(0) } ["Subject"]=> string(1) "S" ["Keywords"]=> NULL ["Author"]=> string(1) "R" ["Comments"]=> string(1) "C" ["Title"]=> string(1) "T" } ===DONE=== ---- FAILED ``` **This test can't be successful cause I have not multibyte decoding support, I think this test should be skiped**: ```php --TEST-- Bug #68547 (Exif Header component value check error) --SKIPIF-- <?php if (!extension_loaded('mbstring')) print 'skip mbstring extension not available';?> <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php var_dump(exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . 'bug68547.jpg')); ?> ===DONE=== --EXPECTF-- array(12) { ["FileName"]=> string(12) "bug68547.jpg" ["FileDateTime"]=> int(%d) ["FileSize"]=> int(713) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(20) "ANY_TAG, IFD0, WINXP" ["COMPUTED"]=> array(5) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(0) } ["Subject"]=> string(10) "Subjec??.." ["Keywords"]=> string(0) "" ["Author"]=> string(9) "Rui Carmo" ["Comments"]=> string(29) "Comments Line2 Line3 Line4" ["Title"]=> string(8) "Title..." } ===DONE=== ``` build params ./configure' '--build=x86_64' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--disable-all' '--with-pic' '--with-password-argon2' '--with-zlib' '--enable-xml' '--with-libxml' '--disable-phpdbg' '--with-pear' '--disable-cgi' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data' 'build_alias=x86_64' ### PHP Version PHP 7.4.29 ### Operating System REHL

« previous php.bugs (#241099) next »