View Issue Details

IDProjectCategoryView StatusLast Update
603RackTablesdefaultpublic2012-09-13 10:55
Reporterracktabler Assigned Toinfrastation  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.20.0 
Target Version0.20.1Fixed in Version0.20.1 
Summary603: Plugin: Cannot redeclare renderFilePreview()
DescriptionIf "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 Reproduceadd new php file with following content to plugins directory

<?php
      require_once 'inc/interface.php';
?>
TagsNo tags attached.

Activities

infrastation

infrastation

2012-09-12 20:43

administrator   ~0000783

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?
racktabler

racktabler

2012-09-13 09:18

reporter   ~0000784

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?
infrastation

infrastation

2012-09-13 10:55

administrator   ~0000785

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?

Issue History

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