Closed (fixed)
Project:
Bibliography Module
Version:
6.x-1.10
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2010 at 15:51 UTC
Updated:
12 Feb 2010 at 19:10 UTC
The function _biblio_admin_get_styles() parses the module directory for 'style' files and loads them without the proper checking.
Instead of:
foreach ($files as $file) {
if (strstr($file, 'biblio_style_')) {
... include file ...
}
}
it should be
foreach ($files as $file) {
if (strstr($file, 'biblio_style_') && preg_match('/\.inc$/',$file)) {
... include file ...
}
}
Without this, a blank page will show up because PHP exits with:
PHP Fatal error: Cannot redeclare biblio_style_custom_info() ...
I know there should be no temporary files in the module directory, but sometimes we need to do some checks and a temporary file is created... Well, at least, i think this should be the correct code to be there.
Comments
Comment #1
rjerome commentedGood point, I will probably just use the Drupal API file_scan_directory function to fix this.
Comment #2
rjerome commentedCommitted to DRUPAL-6--1 and DRUPAL-6--2