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:
128
128
129
129
- |
130
130
# 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
131
136
if [[ ! $skip && $PHP = 5.* ]]; then
132
137
([[ $deps ]] || tfold ext.symfony_debug 'cd src/Symfony/Component/Debug/Resources/ext && phpize && ./configure && make && echo extension = $(pwd)/modules/symfony_debug.so >> '"$INI") &&
133
138
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())
145
145
// If only PHP did the same...
146
146
$ data = json_encode ($ data , $ this ->encodingOptions );
147
147
} 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 {
151
151
$ 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 {
158
153
restore_error_handler ();
159
- } elseif ('Exception ' === get_class ($ e ) && 0 === strpos ($ e ->getMessage (), 'Failed calling ' )) {
160
- throw $ e ->getPrevious () ?: $ e ;
161
154
}
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
+ }
163
164
}
164
165
}
165
166
You can’t perform that action at this time.
0 commit comments