Dotclear


Ignore:
Timestamp:
09/09/16 13:30:35 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

PHP 5.3+ : (expr1 ? expr1 : expr2) may be written → (expr1 ?: expr2)

File:
1 edited

Legend:

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

    r3263 r3340  
    15061506          $cur = $this->con->openCursor($this->prefix.'post'); 
    15071507 
    1508           $cur->cat_id = ($cat_id ? $cat_id : null); 
     1508          $cur->cat_id = ($cat_id ?: null); 
    15091509          $cur->post_upddt = date('Y-m-d H:i:s'); 
    15101510 
     
    15301530          $cur = $this->con->openCursor($this->prefix.'post'); 
    15311531 
    1532           $cur->cat_id = ($new_cat_id ? $new_cat_id : null); 
     1532          $cur->cat_id = ($new_cat_id ?: null); 
    15331533          $cur->post_upddt = date('Y-m-d H:i:s'); 
    15341534 
Note: See TracChangeset for help on using the changeset viewer.

Sites map