Better detection of corrupted module files.

This commit is contained in:
Laurent Destailleur 2013-12-10 16:25:27 +01:00
parent c49af3da48
commit 286bdf91d4
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -259,6 +259,12 @@ class Interfaces
$modName = $modules[$key];
if (empty($modName)) continue;
if (! class_exists($modName))
{
print 'Error: A trigger file was found but its class "'.$modName.'" was not found.'."<br>\n";
continue;
}
$objMod = new $modName($this->db);
// Define disabledbyname and disabledbymodule