equal
deleted
inserted
replaced
2258 |
2258 |
2259 public static function silence_errors($num, $str) |
2259 public static function silence_errors($num, $str) |
2260 { |
2260 { |
2261 // No-op |
2261 // No-op |
2262 } |
2262 } |
|
2263 |
|
2264 /** |
|
2265 * Sanitize a URL by removing HTTP credentials. |
|
2266 * @param string $url the URL to sanitize. |
|
2267 * @return string the same URL without HTTP credentials. |
|
2268 */ |
|
2269 public static function url_remove_credentials($url) |
|
2270 { |
|
2271 return preg_replace('#^(https?://)[^/:@]+:[^/:@]+@#i', '$1', $url); |
|
2272 } |
2263 } |
2273 } |