View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
603 | RackTables | default | public | 2012-09-12 17:29 | 2012-09-13 10:55 |
Reporter | racktabler | Assigned To | infrastation | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.20.0 | ||||
Target Version | 0.20.1 | Fixed in Version | 0.20.1 | ||
Summary | 603: Plugin: Cannot redeclare renderFilePreview() | ||||
Description | If "require_once 'inc/interface.php'" is included in a plugin i get error PHP Fatal error: Cannot redeclare renderFilePreview() (previously declared in /inc/interface.php:5638) in inc/solutions.php on line 316. | ||||
Steps To Reproduce | add new php file with following content to plugins directory <?php require_once 'inc/interface.php'; ?> | ||||
Tags | No tags attached. | ||||
This case looks odd in two regards: 1. There should be no need to re-include RackTables files, their contents should be available to the plugins source code right away. 2. require_once() should guard against such inclusions anyway, although it does not. Could you check? |
|
OK i moved the require into the function i needed it. No more messages. But the function renderFilePreview() does exist in both solutions.php and interface.php files. Is this correct? |
|
A fix for the PHP error will be available in the next release. But to my understanding there is no need to include interface.php from the plugin file. Does it stop working when the include is missing? | |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-12 17:29 | racktabler | New Issue | |
2012-09-12 20:43 | infrastation | Note Added: 0000783 | |
2012-09-13 09:18 | racktabler | Note Added: 0000784 | |
2012-09-13 10:55 | infrastation | Note Added: 0000785 | |
2012-09-13 10:55 | infrastation | Assigned To | => infrastation |
2012-09-13 10:55 | infrastation | Status | new => closed |
2012-09-13 10:55 | infrastation | Resolution | open => fixed |
2012-09-13 10:55 | infrastation | Fixed in Version | => 0.20.1 |
2012-09-13 10:55 | infrastation | Target Version | => 0.20.1 |