@@ -141,7 +141,8 @@ public static function mb_encode_mimeheader($s, $charset = null, $transferEncodi
141
141
public static function mb_decode_numericentity ($ s , $ convmap , $ encoding = null )
142
142
{
143
143
if (null !== $ s && !\is_scalar ($ s ) && !(\is_object ($ s ) && \method_exists ($ s , '__toString ' ))) {
144
- trigger_error ('mb_decode_numericentity() expects parameter 1 to be string, ' .gettype ($ s ).' given ' , E_USER_WARNING );
144
+ trigger_error ('mb_decode_numericentity() expects parameter 1 to be string, ' .\gettype ($ s ).' given ' , E_USER_WARNING );
145
+
145
146
return null ;
146
147
}
147
148
@@ -150,7 +151,8 @@ public static function mb_decode_numericentity($s, $convmap, $encoding = null)
150
151
}
151
152
152
153
if (null !== $ encoding && !\is_scalar ($ encoding )) {
153
- trigger_error ('mb_decode_numericentity() expects parameter 3 to be string, ' .gettype ($ s ).' given ' , E_USER_WARNING );
154
+ trigger_error ('mb_decode_numericentity() expects parameter 3 to be string, ' .\gettype ($ s ).' given ' , E_USER_WARNING );
155
+
154
156
return '' ; // Instead of null (cf. mb_encode_numericentity).
155
157
}
156
158
@@ -185,6 +187,7 @@ public static function mb_decode_numericentity($s, $convmap, $encoding = null)
185
187
return Mbstring::mb_chr ($ c - $ convmap [$ i + 2 ]);
186
188
}
187
189
}
190
+
188
191
return $ m [0 ];
189
192
}, $ s );
190
193
@@ -198,7 +201,8 @@ public static function mb_decode_numericentity($s, $convmap, $encoding = null)
198
201
public static function mb_encode_numericentity ($ s , $ convmap , $ encoding = null , $ is_hex = false )
199
202
{
200
203
if (null !== $ s && !\is_scalar ($ s ) && !(\is_object ($ s ) && \method_exists ($ s , '__toString ' ))) {
201
- trigger_error ('mb_encode_numericentity() expects parameter 1 to be string, ' .gettype ($ s ).' given ' , E_USER_WARNING );
204
+ trigger_error ('mb_encode_numericentity() expects parameter 1 to be string, ' .\gettype ($ s ).' given ' , E_USER_WARNING );
205
+
202
206
return null ;
203
207
}
204
208
@@ -207,12 +211,14 @@ public static function mb_encode_numericentity($s, $convmap, $encoding = null, $
207
211
}
208
212
209
213
if (null !== $ encoding && !\is_scalar ($ encoding )) {
210
- trigger_error ('mb_encode_numericentity() expects parameter 3 to be string, ' .gettype ($ s ).' given ' , E_USER_WARNING );
214
+ trigger_error ('mb_encode_numericentity() expects parameter 3 to be string, ' .\gettype ($ s ).' given ' , E_USER_WARNING );
215
+
211
216
return null ; // Instead of '' (cf. mb_decode_numericentity).
212
217
}
213
218
214
219
if (null !== $ is_hex && !\is_scalar ($ is_hex )) {
215
- trigger_error ('mb_encode_numericentity() expects parameter 4 to be boolean, ' .gettype ($ s ).' given ' , E_USER_WARNING );
220
+ trigger_error ('mb_encode_numericentity() expects parameter 4 to be boolean, ' .\gettype ($ s ).' given ' , E_USER_WARNING );
221
+
216
222
return null ;
217
223
}
218
224
@@ -327,7 +333,7 @@ public static function mb_convert_case($s, $mode, $encoding = null)
327
333
} else {
328
334
$ s = substr_replace ($ s , $ uchr , $ i - $ ulen , $ ulen );
329
335
$ len += $ nlen - $ ulen ;
330
- $ i += $ nlen - $ ulen ;
336
+ $ i += $ nlen - $ ulen ;
331
337
}
332
338
}
333
339
}
0 commit comments