Skip to content

Conversation

Crell
Copy link
Contributor

@Crell Crell commented Aug 13, 2024

There's two bugs here to fix.

  1. parse_url("") cannot handle foo:// style strings. It just returns false. So in that case we need to manually parse the string. (This is arguably a core bug, but there's already an Internals thread about how to replace parse_url("") with something that sucks less.)
  2. Filesystem::fileSize() chokes on a directory, which makes url_stat() fail on directories.

This patch fixes both, and causes my test cases to work in my app. However! The new test I added here still fails with a visibility error. I cannot get my CLI debugger connected properly on this app and cannot run Pest tests directly from IntelliJ (just PHPUnit), so I cannot reasonably debug further myself.

@elazar elazar merged commit 355caf9 into elazar:master Aug 14, 2024
4 checks passed
@Crell Crell deleted the path-fix branch August 14, 2024 15:58
lhridley pushed a commit to drupal-libraries/flystream that referenced this pull request Feb 10, 2025
Handle directories in url_stat()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants