The
realpath()
function in
JPath::find()
is generating null output for $path variable of my component, but it's working for other components correctly.
JPath::find() function accepts two parameters. You need to supply filename you are looking for and more then zero paths where function will search for real path of that file.
This function returns null means, file paths you supplied(its string for only one path and its array when paths are more then one) does not contain any such file you are looking for.
In your code, either the file name is not correct(if file exists in directory you are searching) or file does not exist in any of those file paths you passed in that function.
You will find one example in this file: YOUR_JOOMLA_ROOT/components/com_finder/views/search/view.html.php