/* Parse through the leading whitespace, and display a warning if we
get to the end without encountering a delimiter. */
- while (isspace((int)*p)) p++;
+ while (isspace((int)*(unsigned char *)p)) p++;
if (*p == 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty regular expression");
return NULL;
/* Get the delimiter and display a warning if it is alphanumeric
or a backslash. */
delimiter = *p++;
- if (isalnum((int)delimiter) || delimiter == '\\') {
+ if (isalnum((int)*(unsigned char *)&delimiter) || delimiter == '\\') {
php_error_docref(NULL TSRMLS_CC,E_WARNING, "Delimiter must not be alphanumeric or backslash");
return NULL;
}