zend_builtin_functions.c

Diff code posted
created at 21 Sep 18:53

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@@ -303,13 +300,14 @@
    Get string length */
 ZEND_NAMED_FUNCTION(zend_if_strlen)
 {
-  zval **str;
+  char *s1;
+  int s1_len;
 
-  if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
-    ZEND_WRONG_PARAM_COUNT();
+  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &s1, &s1_len) == FAILURE) {
+    return;
   }
-  convert_to_string_ex(str);
-  RETVAL_LONG(Z_STRLEN_PP(str));
+
+  RETVAL_LONG(s1_len);
 }
 /* }}} */
455 Bytes in 2 ms with coderay