1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/12273] Fix method name of test and fix undefined index

PHPBB3-12273
This commit is contained in:
Joas Schilling
2014-04-20 17:08:06 +02:00
parent 5889255529
commit a2c3b2534a
2 changed files with 14 additions and 3 deletions

View File

@@ -241,6 +241,11 @@ class md_exporter
$files = explode("\n + ", $file_details);
foreach ($files as $file)
{
if (!file_exists($this->root_path . $file))
{
throw new \LogicException("Invalid file '{$file}' not found for event '{$this->current_event}'", 1);
}
if (($this->filter !== 'adm') && strpos($file, 'styles/prosilver/template/') === 0)
{
$files_list['prosilver'][] = substr($file, strlen('styles/prosilver/template/'));
@@ -312,6 +317,12 @@ class md_exporter
{
return true;
}
else if (empty($this->events_by_file[$file]))
{
$event_list = implode("', '", $events);
throw new \LogicException("File '{$file}' should not contain events, but contains: "
. "'{$event_list}'", 1);
}
else if (empty($events))
{
$event_list = implode("', '", $this->events_by_file[$file]);