Skip to content
Snippets Groups Projects
Commit 5aa99474 authored by Preexo's avatar Preexo
Browse files

fixed a few notices and warnings

parent 89bb9b83
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ class DateTimeField {
} elseif ($format == 'yyyy-mm-dd') {
$date[0] = $y . '-' . $m . '-' . $d;
}
if ($date[1] != '') {
if (isset($date[1]) && $date[1] != '') {
$userDate = $date[0] . ' ' . $date[1];
} else {
$userDate = $date[0];
......@@ -252,7 +252,7 @@ class DateTimeField {
$log->debug("Entering getDisplayDate(" . $this->datetime . ") method ...");
$date_value = explode(' ',$this->datetime);
if ($date_value[1] != '') {
if (isset($date_value[1]) && $date_value[1] != '') {
$date = self::convertToUserTimeZone($this->datetime, $user);
$date_value = $date->format('Y-m-d');
}
......
......@@ -84,10 +84,10 @@ class Vtiger_MenuStructure_Model extends Vtiger_Base_Model {
}
if(!empty($selectedMenu) && !array_key_exists($selectedMenu, $menuListArray[self::TOP_MENU_INDEX])) {
$selectedMenuModel = $menuModelList[$selectedMenu];
if($selectedMenuModel) {
if(isset($menuModelList[$selectedMenu])){
$selectedMenuModel = $menuModelList[$selectedMenu];
$menuListArray[self::TOP_MENU_INDEX][$selectedMenuModel->get('name')] = $selectedMenuModel;
}
}
}
// Apply custom comparator
......
......@@ -23,7 +23,7 @@ class Vtiger_Date_UIType extends Vtiger_Base_UIType {
* @param <Object> $value
* @return <Object>
*/
public function getDisplayValue($value) {
public function getDisplayValue($value, $record=false, $recordInstance=false) {
if(empty($value)){
return $value;
} else {
......
......@@ -319,7 +319,7 @@ class PBXManager extends CRMEntity {
$log->fatal('MakeOutgoingCalls ActionName Removed');
}
static function checkLinkPermission($linkData){
public static function checkLinkPermission($linkData){
$module = new Vtiger_Module();
$moduleInstance = $module->getInstance('PBXManager');
......
......@@ -295,6 +295,7 @@ class Vtiger_Deprecated {
static function getAnnouncements() {
global $adb;
$announcement = '';
$sql = " select * from vtiger_announcement inner join vtiger_users on vtiger_announcement.creatorid=vtiger_users.id";
$sql.=" AND vtiger_users.is_admin='on' AND vtiger_users.status='Active' AND vtiger_users.deleted = 0";
$result = $adb->pquery($sql, array());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment