I uploaded a project from localhost to remote server and it didn't work. I found out that these lines are causing the error
if(!empty(ltrim(rtrim($string)))){
$default_value = $string;
}
Then I have changed it to
$string = ltrim(rtrim($string));
if(!empty($string)){
$default_value = $string;
}
And it's working. What is causing the error ?
No error is shown, only blank page. Changing ltrim(rtrim($string)) to just trim($string) doesn't help.
trim()call!trim()also removes whitespace between 2 words.