mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
Check that some things exist before trying to use them
This commit is contained in:
parent
95f84454be
commit
8063d65303
@ -1213,7 +1213,7 @@ abstract class Merge
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Look for numbers, set their value if needed
|
// Look for numbers, set their value if needed
|
||||||
if($this->numeric_fields || count($names))
|
if(property_exists($this,'numeric_fields') || count($names))
|
||||||
{
|
{
|
||||||
foreach((array)$this->numeric_fields as $fieldname) {
|
foreach((array)$this->numeric_fields as $fieldname) {
|
||||||
$names[] = preg_quote($fieldname,'/');
|
$names[] = preg_quote($fieldname,'/');
|
||||||
@ -1573,6 +1573,10 @@ abstract class Merge
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
$classname = "{$app}_merge";
|
$classname = "{$app}_merge";
|
||||||
|
if(!class_exists($classname))
|
||||||
|
{
|
||||||
|
return $replacements;
|
||||||
|
}
|
||||||
$class = new $classname();
|
$class = new $classname();
|
||||||
$method = $app.'_replacements';
|
$method = $app.'_replacements';
|
||||||
if(method_exists($class,$method))
|
if(method_exists($class,$method))
|
||||||
|
Loading…
Reference in New Issue
Block a user