From: Marcus Boerger Date: Sun, 29 Aug 2004 19:15:57 +0000 (+0000) Subject: MFH: String offset starts with 0 X-Git-Tag: php-5.0.2RC1~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=975771b4313318d3ed037e3959f457400452e354;p=php MFH: String offset starts with 0 --- diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a52dac0904..9103400fb8 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4032,12 +4032,12 @@ static int zend_isset_isempty_dim_prop_obj_handler(int prop_dim, ZEND_OPCODE_HAN } else if ((*container)->type == IS_STRING) { /* string offsets */ switch (opline->extended_value) { case ZEND_ISSET: - if (offset->value.lval <= Z_STRLEN_PP(container)) { + if (offset->value.lval < Z_STRLEN_PP(container)) { result = 1; } break; case ZEND_ISEMPTY: - if (offset->value.lval <= Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { + if (offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') { result = 1; } break;