in /plugins/tinymce/admin.php the following code
Code: Select all
include $pth['folder']['classes'] . 'FileEdit.php';
Code: Select all
include $pth['folder']['classes'] . 'FileEdit.php';
Indeed, Holger, there should be a include_once.Holger wrote:Hi,
in /plugins/tinymce/admin.php the following codemust be changed to include_once or require_once to prevent a fatal error (cannot redeclare a existing class) when another plugin tries to include the file too.Code: Select all
include $pth['folder']['classes'] . 'FileEdit.php';
ACK. Generally, classes and pure procedural files should be included/required _once, IMO, opposed to pure data files (such as config.php). It's not so clear to me how to treat files containing global code and definitions, such as index.php and admin.php of plugins. Traditionally, they are simply include'd.manu wrote:Indeed, Holger, there should be a include_once.
Code: Select all
if (!class_exists('XH_FileEdit')) {
include_once $pth['folder']['classes'] . 'FileEdit.php';
}