Changeset 16168


Ignore:
Timestamp:
Jun 29, 2012, 6:26:22 AM (12 years ago)
Author:
rvelices
Message:

bug 2668 - fix php warnings on glob function (merge from trunk to 2.4)

Location:
branches/2.4/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/admin/configuration.php

    r15951 r16168  
    515515      $watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
    516516    }
    517     foreach (glob(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'watermarks/*.png') as $file)
    518     {
    519       $watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
     517    if ( ($glob=glob(PHPWG_ROOT_PATH.PWG_LOCAL_DIR.'watermarks/*.png')) !== false)
     518    {
     519      foreach ($glob as $file)
     520      {
     521        $watermark_files[] = substr($file, strlen(PHPWG_ROOT_PATH));
     522      }
    520523    }
    521524    $watermark_filemap = array( '' => '---' );
  • branches/2.4/admin/include/functions.php

    r13651 r16168  
    23612361  }
    23622362  $path = substr_replace($path, $pattern, $dot, 0);
    2363   foreach( glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path) as $file)
    2364   {
    2365     @unlink($file);
     2363  if ( ($glob=glob(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$path)) !== false)
     2364  {
     2365    foreach( $glob as $file)
     2366    {
     2367      @unlink($file);
     2368    }
    23662369  }
    23672370}
Note: See TracChangeset for help on using the changeset viewer.