Skip to content

Not working when using a virtual folder in URL #120

Description

@GoogleCodeExporter
Hello.

If I have a WordPress installation in a virtual folder...

http://www.server.com/virtual/wp-content/uploads/2010/image.jpg

...when thumb.php comes to...

function get_document_root ($src)

...it's not going to find the path, because...

$src = 'virtual/wp-content/uploads/2010/image.jpg'

... and 'virtual' it's not a real folder. I propose you a change to your 
bucle...

    foreach ($paths as $path) {
        if(file_exists($path . '/' . $src)) {
            return $path;
        }
    }

...and another change to the call of the function (that implies a light improve 
in the return's).

Please, see the changes in the attached file (search for the string "// FIX"). 
I think that would cover a lot more of situations when talking of virtual 
folders in an URL.

Thanks.

Original issue reported on code.google.com by inbytes...@gmail.com on 7 Oct 2010 at 11:08

Attachments:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions