summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2013-12-18 17:00:26 +0000
committerkrakjoe <joe.watkins@live.co.uk>2013-12-18 17:00:26 +0000
commit08393ad2aca8b4f22b1d206ef8e771fa07fe0385 (patch)
treed36cc759404fab344930a090413b8fc1154ec071
parent944ebb36c8e92f96a0bc5613e0eee8a37960d328 (diff)
downloadphp-git-08393ad2aca8b4f22b1d206ef8e771fa07fe0385.tar.gz
disregard leading slash
-rw-r--r--phpdbg_utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpdbg_utils.c b/phpdbg_utils.c
index 8584d20a03..86c17a71be 100644
--- a/phpdbg_utils.c
+++ b/phpdbg_utils.c
@@ -115,6 +115,12 @@ PHPDBG_API int phpdbg_is_class_method(const char *str, size_t len, char **class,
}
if (class != NULL) {
+
+ if (str[0] == '\\') {
+ str++;
+ len--;
+ }
+
*class = estrndup(str, sep - str);
(*class)[sep - str] = 0;
}