Dotclear

Changeset 3299:18dc878c1178 for inc


Ignore:
Timestamp:
08/05/16 12:05:20 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Protect media sorting callback function from null arg(s)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.media.php

    r3205 r3299  
    350350     protected function sortFileHandler($a,$b) 
    351351     { 
     352          if (is_null($a) || is_null($b)) { 
     353               return (is_null($a) ? 1 : -1); 
     354          } 
    352355          switch ($this->file_sort) 
    353356          { 
     
    485488               } 
    486489          } 
    487           usort($this->dir['files'],array($this,'sortFileHandler')); 
     490          try { 
     491               usort($this->dir['files'],array($this,'sortFileHandler')); 
     492          } catch (Exception $e) {} 
    488493     } 
    489494 
Note: See TracChangeset for help on using the changeset viewer.

Sites map