File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ before_install:
128128
129129 - |
130130 # Install extra PHP extensions
131+ if [[ ! $skip && $PHP = 7.0 ]]; then
132+ wget https://github.com/symfony/binary-utils/releases/download/v0.1/ldap-php70.tar.bz2
133+ tar -xjf ldap-php70.tar.bz2
134+ echo extension = $(pwd)/ldap.so >> $INI
135+ fi
131136 if [[ ! $skip && $PHP = 5.* ]]; then
132137 ([[ $deps ]] || tfold ext.symfony_debug 'cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> '"$INI") &&
133138 tfold ext.apcu4 'echo yes | pecl install -f apcu-4.0.11'
Original file line number Diff line number Diff line change @@ -145,21 +145,22 @@ public function setData($data = array())
145145 // If only PHP did the same...
146146 $ data = json_encode ($ data , $ this ->encodingOptions );
147147 } else {
148- try {
149- if (! interface_exists ( ' JsonSerializable ' , false )) {
150- set_error_handler ( function () { return false ; });
148+ if (! interface_exists ( ' JsonSerializable ' , false )) {
149+ set_error_handler ( function () { return false ; });
150+ try {
151151 $ data = @json_encode ($ data , $ this ->encodingOptions );
152- restore_error_handler ();
153- } else {
154- $ data = json_encode ($ data , $ this ->encodingOptions );
155- }
156- } catch (\Exception $ e ) {
157- if (!interface_exists ('JsonSerializable ' , false )) {
152+ } finally {
158153 restore_error_handler ();
159- } elseif ('Exception ' === get_class ($ e ) && 0 === strpos ($ e ->getMessage (), 'Failed calling ' )) {
160- throw $ e ->getPrevious () ?: $ e ;
161154 }
162- throw $ e ;
155+ } else {
156+ try {
157+ $ data = json_encode ($ data , $ this ->encodingOptions );
158+ } catch (\Exception $ e ) {
159+ if ('Exception ' === get_class ($ e ) && 0 === strpos ($ e ->getMessage (), 'Failed calling ' )) {
160+ throw $ e ->getPrevious () ?: $ e ;
161+ }
162+ throw $ e ;
163+ }
163164 }
164165 }
165166
You can’t perform that action at this time.
0 commit comments