@@ -1255,23 +1255,31 @@ function imap_base64($string)
12551255if (!function_exists ('imap2_base64 ' )) {
12561256 function imap2_base64 ($ string )
12571257 {
1258- return function_exists ('imap_base64 ' ) ? imap_base64 ($ string ) : Polyfill::base64 ($ string );
1258+ if (IMAP2_RETROFIT_MODE ) {
1259+ return imap_base64 ($ string );
1260+ }
1261+
1262+ return Polyfill::base64 ($ string );
12591263 }
12601264}
12611265
12621266/**
12631267 * imap2_binary
12641268 */
12651269if (!function_exists ('imap_binary ' )) {
1266- function imap_base64 ($ string )
1270+ function imap_binary ($ string )
12671271 {
12681272 return imap2_binary ($ string );
12691273 }
12701274}
12711275if (!function_exists ('imap2_binary ' )) {
12721276 function imap2_binary ($ string )
12731277 {
1274- return function_exists ('imap_binary ' ) ? imap_binary ($ string ) : Polyfill::binary ($ string );
1278+ if (IMAP2_RETROFIT_MODE ) {
1279+ return imap_binary ($ string );
1280+ }
1281+
1282+ return Polyfill::binary ($ string );
12751283 }
12761284}
12771285
@@ -1281,13 +1289,17 @@ function imap2_binary($string)
12811289if (!function_exists ('imap_mime_header_decode ' )) {
12821290 function imap_mime_header_decode ($ string )
12831291 {
1284- return Polyfill:: mimeHeaderDecode ($ string );
1292+ return imap2_mime_header_decode ($ string );
12851293 }
12861294}
12871295if (!function_exists ('imap2_mime_header_decode ' )) {
12881296 function imap2_mime_header_decode ($ string )
12891297 {
1290- return imap_mime_header_decode ($ string );
1298+ if (IMAP2_RETROFIT_MODE ) {
1299+ return imap_mime_header_decode ($ string );
1300+ }
1301+
1302+ return Polyfill::mimeHeaderDecode ($ string );
12911303 }
12921304}
12931305
@@ -1297,13 +1309,17 @@ function imap2_mime_header_decode($string)
12971309if (!function_exists ('imap_mutf7_to_utf8 ' )) {
12981310 function imap_mutf7_to_utf8 ($ string )
12991311 {
1300- return Polyfill:: mutf7ToUtf8 ($ string );
1312+ return imap2_mutf7_to_utf8 ($ string );
13011313 }
13021314}
13031315if (!function_exists ('imap2_mutf7_to_utf8 ' )) {
13041316 function imap2_mutf7_to_utf8 ($ string )
13051317 {
1306- return imap_mutf7_to_utf8 ($ string );
1318+ if (IMAP2_RETROFIT_MODE ) {
1319+ return imap_mutf7_to_utf8 ($ string );
1320+ }
1321+
1322+ return Polyfill::mutf7ToUtf8 ($ string );
13071323 }
13081324}
13091325
0 commit comments