View Issue Details

IDProjectCategoryView StatusLast Update
0001387OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:45
Reporterkdasdasf Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.1.6 revision 22740 
Fixed in Version4.2.0 revision 23610 
Summary0001387: oxutilsfile::_moveImage doesn't work if sCompileDir == upload dir
DescriptionIf sCompileDir (= oxutilsfile::processFiles::$sTmpDir) equals the PHP upload directory then move_uploaded_file will fail because $sSource equals $sTarget.



---( Fix )---
    protected function _moveImage( $sSource, $sTarget )
    {
        if ( $sSource == $sTarget ) {
            return chmod( $sTarget, 0644 );
        }

        if ( move_uploaded_file( $sSource, $sTarget ) ) ) {
            return $this->_moveImage( $sTarget, $sTarget );
        }

        return FALSE;
    }
---
TagsNo tags attached.
Theme
BrowserAll
PHP Version5.2.6
Database Version5.0.33

Activities

arvydas_vapsva

2009-10-22 10:34

reporter   ~0001951

good hint, thnx!