[wp-trac] [WordPress Trac] #30258: Upload_path can cause a loop after migrating

WordPress Trac noreply at wordpress.org
Wed Nov 5 10:12:31 UTC 2014


#30258: Upload_path can cause a loop after migrating
--------------------------+-----------------------------
 Reporter:  sowmedia      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Option "upload_path" is set while hosting at ISP A. After switching to ISP
 B, where this path is outside of the open_basedir, the site enters a loop
 at wp-includes/functions.php:1497 that is only exitted when the maximum
 execution time of php is reached.

 I would suggest:

 {{{
 while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
   if(dirname($target_parent)==$target_parent)
   return false; // Root reached
   $target_parent = dirname( $target_parent );
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30258>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list