Skip to content

Commit 59d99a2

Browse files
bugreportusernikic
authored andcommitted
Remove unnecessary base64_encode() return value check
php_base64_encode() never returns NULL, so base64_encode() will never return false.
1 parent e8538b9 commit 59d99a2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ext/standard/base64.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -790,11 +790,7 @@ PHP_FUNCTION(base64_encode)
790790
ZEND_PARSE_PARAMETERS_END();
791791

792792
result = php_base64_encode((unsigned char*)str, str_len);
793-
if (result != NULL) {
794-
RETURN_STR(result);
795-
} else {
796-
RETURN_FALSE;
797-
}
793+
RETURN_STR(result);
798794
}
799795
/* }}} */
800796

0 commit comments

Comments
 (0)