Skip to content

Commit 9ee9c0e

Browse files
authored
Sync exif dependency on mbstring extension as optional (php#16062)
When decoding multibyte data in EXIF tags, the mbstring extension needs to be enabled. In Autotools this is now synced with ZEND_MOD_OPTIONAL in the C code, and on Windows it is now also optional. The required dependency on mbstring extension was removed via 755c2cd which made the mbstring extension optional dependency.
1 parent d62b9eb commit 9ee9c0e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

ext/exif/config.m4

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ if test "$PHP_EXIF" != "no"; then
1010
[exif.c],
1111
[$ext_shared],,
1212
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
13+
PHP_ADD_EXTENSION_DEP(exif, mbstring, true)
1314
fi

ext/exif/config.w32

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22

33
ARG_ENABLE('exif', 'Exchangeable image information (EXIF) Support', 'no');
44

5-
if(PHP_EXIF != 'no')
6-
{
7-
if(ADD_EXTENSION_DEP('exif', 'mbstring'))
8-
{
9-
AC_DEFINE('HAVE_EXIF', 1, "Define to 1 if the PHP extension 'exif' is available.");
10-
11-
EXTENSION('exif', 'exif.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
12-
}
5+
if(PHP_EXIF != 'no') {
6+
AC_DEFINE('HAVE_EXIF', 1, "Define to 1 if the PHP extension 'exif' is available.");
7+
EXTENSION('exif', 'exif.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
8+
ADD_EXTENSION_DEP('exif', 'mbstring', true);
139
}

0 commit comments

Comments
 (0)