fixing  PHP Warning:  array_walk_recursive() expects parameter 1 to be array, string given in
prevent duplicate slash