summaryrefslogtreecommitdiff
path: root/ext/ctype/ctype.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ctype/ctype.c')
-rw-r--r--ext/ctype/ctype.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c
index 0e7e4699bd..db88978eb5 100644
--- a/ext/ctype/ctype.c
+++ b/ext/ctype/ctype.c
@@ -97,7 +97,11 @@ PHP_MINFO_FUNCTION(ctype)
return; \
switch (Z_TYPE_P(c)) { \
case IS_LONG: \
- RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
+ if (Z_LVAL_P(c) < 255 && Z_LVAL_P(c) > -127) { \
+ RETURN_BOOL(iswhat(Z_LVAL_P(c))); \
+ } \
+ SEPARATE_ZVAL(&c); \
+ convert_to_string(c); \
case IS_STRING: \
{ \
char *p; \