Update logbook_model.php

Needed to check for existence of 'freq' in log.
pull/179/head
teabreakninja 2016-01-18 12:31:41 +00:00
rodzic 9cc5962e55
commit b750276dad
1 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -695,8 +695,13 @@ class Logbook_model extends CI_Model {
}
// Store Freq
$cleanfreq = preg_replace('#\W#', '', $record['freq']);
$freqlng = strlen($cleanfreq);
// Check if 'freq' is defined in the import?
if (isset($record['freq'])){
$cleanfreq = preg_replace('#\W#', '', $record['freq']);
$freqlng = strlen($cleanfreq);
}else{
$freqlng = 0;
}
if(isset($record['freq']) && $freqlng < 7 ) {
$cleansedstring = preg_replace('#\W#', '', $record['freq']);
$freq = $cleansedstring."000";