Project

General

Profile

« Previous | Next » 

Revision 7896

web/vegpath/util.php: partition(): Fixed bug where strpos() takes the search-for param first rather than second

View differences:

util.php
34 34

  
35 35
function partition($str, $delim)
36 36
{
37
	$delim_idx = strpos($str, $delim);
37
	$delim_idx = strpos($delim, $str);
38 38
	return $delim_idx >= 0 ? new Path(substr($str, 0, $delim_idx),
39 39
		substr($str, $delim_idx+strlen($delim))) : new Path($str, "");
40 40
}

Also available in: Unified diff