That will allow the password element to include a '@' symbol without
confusing the DSN parser.
Submitted by: Alex L <admin@networkessence.net>
// Get (if found): username and password
// $dsn => username:password@protocol+hostspec/database
- if (($at = strpos($dsn,'@')) !== false) {
+ if (($at = strrpos($dsn,'@')) !== false) {
$str = substr($dsn, 0, $at);
$dsn = substr($dsn, $at + 1);
if (($pos = strpos($str, ':')) !== false) {
}
}
-?>
\ No newline at end of file
+?>