View Issue Details

IDProjectCategoryView StatusLast Update
0000225WackoWikicorepublic2009-10-13 16:05
Reporteradministrator Assigned ToTann San  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.2 
Fixed in Version5.0.beta 
Summary0000225: design fault ? include is the wrong function to use in function LoadResource
Descriptionby Chris Vogel https://www.link-goe.de:666/tikiwiki/tiki-index.php?page=WackoWiki

While doing other stuff my mind always came up again with the question why such a simple error could break that file-method which failed to deliver my picture in bluenatic theme without a leading 0x0a. Finally I looked up the include-


function in PHPs manual at http://de3.php.net/manual/en/function.include.php and found the following:

"When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags."

I guess include is the wrong function to use in function LoadResource? from classes/wacko.php. I can't imagine any reason why the developers would want to drop out of PHP mode to HTML mode while including the language information.
TagsNo tags attached.

Activities

Tann San

2008-09-21 16:07

manager   ~0000514

LoadResource is used exclusively for loading the language files. They are all wrapped in <?php /* coda */ ?> tags. Besides writing our own file read via the "file" functions we only have include and require (ignoring the _once versions of each). The language files populate an array in the main class called "themeResource". For any extra space to show up in your theme would mean the extra space would be in the string itself. I don't have the "bluenatic" theme you mention so I can't say what's wrong with it one way or the other. All I can say is that the main language loading system is fine and is not responsible for the behaviour you describe. It sounds more like the theme itself is duff and is therefore the resposibility of the theme creator to fix.

Tann San

2008-09-21 16:09

manager   ~0000515

Not a core bug.

Issue History

Date Modified Username Field Change
2008-09-06 00:31 administrator New Issue
2008-09-06 00:31 administrator Legacy => NEW
2008-09-21 16:07 Tann San Note Added: 0000514
2008-09-21 16:07 Tann San Status new => assigned
2008-09-21 16:07 Tann San Assigned To => Tann San
2008-09-21 16:09 Tann San Note Added: 0000515
2008-09-21 16:09 Tann San Status assigned => resolved
2008-09-21 16:09 Tann San Fixed in Version => 5.0.0
2008-09-21 16:09 Tann San Resolution open => no change required
2008-10-05 17:41 administrator Severity major => minor
2009-10-13 16:05 administrator Fixed in Version 5.0.0 => 5.0.beta
2010-03-08 10:12 administrator Category Core => core