lib/mail/Attachment.php
private function isBase64($string) 
    {
        $decoded_data = base64_decode($string, true);
        $encoded_data = base64_encode($decoded_data);
        if ($encoded_data != $string) {
            return false;
        }
        return true;
    }
private function isBase64($string) 
    {
        $decoded_data = base64_decode($string, true);
        $encoded_data = base64_encode($decoded_data);
        if ($encoded_data != $string) {
            return false;
        }
        return true;
    }
private function isBase64 ( $ string ) { $ decoded_data = base64_decode ( $ string , true ) ; $ encoded_data = base64_encode ( $ decoded_data ) ; if ( $ encoded_data != $ string ) { return false ; } return true ; }
Verifies whether or not the provided string is a valid base64 string

@param $string string The string that has to be checked
@return bool
Verifies whether or not the provided string is a valid base64 string