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.comon 7 Oct 2010 at 11:08Attachments: