Changeset 10002

Show
Ignore:
Timestamp:
06/30/10 00:27:43 (3 years ago)
Author:
p_lindheimer
Message:

Merged revisions 10001 via svnmerge from
http://svn.freepbx.org/modules/branches/2.7

........

r10001 | p_lindheimer | 2010-06-29 21:26:24 -0700 (Tue, 29 Jun 2010) | 1 line


don't try to execute sql statements if the insert_array is empty, pear throws a distracting warning

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.8

    • Property svnmerge-integrated changed from /modules/branches/2.7:1-9074,9105 to /modules/branches/2.7:1-9074,9105,10001
  • modules/branches/2.8/fax/install.php

    r9424 r10002  
    231231    } 
    232232 
    233     $compiled = $db->prepare("INSERT INTO `fax_incoming` (`extension`, `cidnum`, `detection`, `detectionwait`, `destination`, `legacy_email`) VALUES (?,?,?,?,?,?)"); 
    234     $result = $db->executeMultiple($compiled,$insert_array); 
    235     if(DB::IsError($result)) { 
     233    if (!empty($insert_array)) { 
     234      $compiled = $db->prepare("INSERT INTO `fax_incoming` (`extension`, `cidnum`, `detection`, `detectionwait`, `destination`, `legacy_email`) VALUES (?,?,?,?,?,?)"); 
     235      $result = $db->executeMultiple($compiled,$insert_array); 
     236    } 
     237    if(!empty($insert_array) && DB::IsError($result)) { 
    236238      out("Fatal error migrating to fax module..legacy data retained in incoming and globals tables"); 
    237239      die_freepbx( "Fatal error during migration: " . $result->getMessage() .  "\n");