(The last one, I promise.)
Calling basename on a link URL to obtain the pagename will fail for pages containing slashes.
This makes a subsequent call to wfFindFile( $filename )->getLocalRefPath() bail out complaining about using getLocalRef on a bool value.
Another occurrence is at https://github.com/wikimedia/mediawiki-extensions-DocBookExport/blob/1a66ee35a2403083868a7d99b8a94c97e3168599/DocBookExportAPI.php#L341
This is less critical, as it will probably just lead to links not appearing in the final document.