[wp-testers] sorta an off the wall bug

Otto otto at ottodestruct.com
Thu Jun 21 18:35:37 UTC 2012


On Thu, Jun 21, 2012 at 1:32 PM, Philip M. Hofer (Frumph)
<philip at frumph.net> wrote:
> upload_path = "/home/funk/wp-content/uploads
> SAVED ABSPATH IN upload_path = "/home/funk"
> NEW CURRENT ABSPATH  = "/home/foo"
>
> echo substr( WP_CONTENT_DIR, strlen( ABSPATH ) ).'uploads';
>
> will produce "/home/funk/wp-content/uploads".

a) No, it won't.
b) You didn't say what WP_CONTENT_DIR is set to.
c) Doesn't actually matter what that produces, because that code is
only run on new installs. You're in schema.php. That code doesn't run
when moving old installs.

The upload_path is set in the database. It doesn't change when you
move an install somewhere else.

So why was upload_path set to /home/funk/wp-content/uploads in the
first place? On a new install, it is *not* set to an absolute path.
Just tested that myself.

-Otto


More information about the wp-testers mailing list