]> granicus.if.org Git - php/commitdiff
- fix bug #37945 pathinfo() cannot handle argument with special characters
authorMichael Wallner <mike@php.net>
Mon, 17 Jul 2006 20:36:47 +0000 (20:36 +0000)
committerMichael Wallner <mike@php.net>
Mon, 17 Jul 2006 20:36:47 +0000 (20:36 +0000)
  like german "Umlaute"

NEWS
ext/standard/string.c

diff --git a/NEWS b/NEWS
index 4f89ff8b96bf1f09c1a1f716d2ddccb42baf5f61..6b5b34b6a87f16b7a27f2f1e56075781a255b91e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -102,6 +102,8 @@ PHP                                                                        NEWS
   private constructors from invalid context). (Tony)
 - Fixed bug #37987 (invalid return of file_exists() in safe mode). (Ilia)
 - Fixed bug #37947 (zend_ptr_stack reallocation problem). (Dmitry)
+- Fixed bug #37945 (pathinfo() cannot handle argument with special characters
+  like german "Umlaute"). (Mike)
 - Fixed bug #37931 (possible crash in OCI8 after database restart 
   when using persistent connections). (Tony)
 - Fixed bug #37920 (compilation problems on z/OS). (Tony)
index 3323f306af51dc3ab22f52215ba7e51934f2253c..2eacd3ead0eec4dcea23573e4fa7efe89c7feeef 100644 (file)
@@ -1173,7 +1173,12 @@ PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char
                                                state = 1;
                                        }
                                }
+                               break;
                        default:
+                               if (state == 0) {
+                                       comp = c;
+                                       state = 1;
+                               }
                                break;
                }
                c += inc_len;