Comments

I'd bet this differing behavior is due to @filesource only being used in page-level docblocks (and therefore _not_ having any effect on documentation of elements like class/var/method), whereas "-s on" means _all_ sourcecode is captured and therefore it is safe for the element docs to assume links from its line numbers will indeed have a file to point to.

Testing this myself, and I'm having no problem. Tried on v1.4.0 and on new v1.4.1, using PHP v5.2.5 on Linux.
The only way I can _not_ have line numbers, is to have _neither_ "@filesource" nor "-s on". If I have "@filesource", then "-s" makes no difference either way... I _do_ have linked line numbers in the output.
If I don't use "@filesource", then "-s off" leaves me no linked line numbers, whereas "-s on" does give me links.
So, I cannot duplicate this problem. I'll have to try specifically on WinXP to see if it's OS specific.

Tested this on Mac OS X, v1.4.1 with PHP v4.4.7, and everything works just as perfectly as it does for me on Linux.
I've therefore isolated this bug behavior to Windows, and confirmed it still exists in PhpDoc v1.4.1.

Monitoring the getSourceAnchor() method in the HTMLSmartyConverter class, I see the different behavior between Windows and Linux... I don't see the method being called on Windows at all, whereas on Linux it is being called and is producing the line number hyperlink.

Eventually found a path comparison check that was using a forward-slashed path to compare to a backslashed path, on Windows at least. The Converter patch fixes that.
I also found a logic error in the setPath() method of the parserElement class, so the other patch fixes it. This error did not affect this bug, as per my testing, but was an obvious error nonetheless.
I want to test these patches tonight on my Mac (PHP4 on OS X) to be sure they work fine there, as well as doing my larger regression testing.