aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/event
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-04-20 17:08:06 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-04-24 16:51:41 +0200
commita2c3b2534a3a187a7ccc3e4b86ba69735c4b8b1a (patch)
tree6d6ccfdd89eb31ccde28dc37680aa6c2212cb9a7 /phpBB/phpbb/event
parent58892555299ad9df5bdd2c5401a854068860e68d (diff)
downloadforums-a2c3b2534a3a187a7ccc3e4b86ba69735c4b8b1a.tar
forums-a2c3b2534a3a187a7ccc3e4b86ba69735c4b8b1a.tar.gz
forums-a2c3b2534a3a187a7ccc3e4b86ba69735c4b8b1a.tar.bz2
forums-a2c3b2534a3a187a7ccc3e4b86ba69735c4b8b1a.tar.xz
forums-a2c3b2534a3a187a7ccc3e4b86ba69735c4b8b1a.zip
[ticket/12273] Fix method name of test and fix undefined index
PHPBB3-12273
Diffstat (limited to 'phpBB/phpbb/event')
-rw-r--r--phpBB/phpbb/event/md_exporter.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/phpbb/event/md_exporter.php b/phpBB/phpbb/event/md_exporter.php
index 8dba963f11..708900c693 100644
--- a/phpBB/phpbb/event/md_exporter.php
+++ b/phpBB/phpbb/event/md_exporter.php
@@ -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]);