General Community > Off-Topic
save.php: duplicate code?
(1/1)
Anonymous:
Hi,
browsing through the source and noticed on line 150 in install/save.php
--- Code: ---// Remove any slashes at the end of the URL
if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
}
if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
}
if(substr($wb_url, strlen($wb_url)-1, 1) == "/") {
$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
}
if(substr($wb_url, strlen($wb_url)-1, 1) == "\\") {
$wb_url = substr($wb_url, 0, strlen($wb_url)-1);
}
--- End code ---
Seems to me that if-statements 2 and 4 are exactly the same?
Should the slashes perhaps be // in statement 4?
Navigation
[0] Message Index
Go to full version