Project

General

Profile

Bug #16799 » t3lib_div-PHP52.diff

Administrator Admin, 2006-12-22 10:10

View differences:

class.t3lib_div.php 2006-12-22 10:08:22.000000000 +0100
} else { // Just a value:
// Look for binary chars:
if (strcspn($v,$binaryChars) != strlen($v)) { // Go for base64 encoding if the initial segment NOT matching any binary char has the same length as the whole string!
$vLen = strlen($v); // check for length, because PHP 5.2.0 crashes when first argument of strcspn is empty
if ($vLen && strcspn($v,$binaryChars) != $vLen) { // Go for base64 encoding if the initial segment NOT matching any binary char has the same length as the whole string!
// If the value contained binary chars then we base64-encode it an set an attribute to notify this situation:
$content = chr(10).chunk_split(base64_encode($v));
$attr.=' base64="1"';
(2-2/2)