From ff5777055c50239cbf16cde9fe75e54cd2c861b8 Mon Sep 17 00:00:00 2001 From: Sean Molenaar Date: Mon, 31 Oct 2016 13:16:26 +0100 Subject: [PATCH] Allow for numeric filenames -.- --- src/PHPDraft/In/ApibFileParser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PHPDraft/In/ApibFileParser.php b/src/PHPDraft/In/ApibFileParser.php index bd2bf343..d6ae2fc0 100644 --- a/src/PHPDraft/In/ApibFileParser.php +++ b/src/PHPDraft/In/ApibFileParser.php @@ -33,6 +33,8 @@ public function __construct($filename = 'index.apib') { $this->location = pathinfo($filename, PATHINFO_DIRNAME) . '/'; + set_include_path(get_include_path().':'.$this->location); + $this->full_apib = $this->get_apib($filename); } @@ -49,7 +51,7 @@ function get_apib($filename) $this->file_check($filename); $file = file_get_contents($filename); $matches = []; - preg_match_all('', $file, $matches); + preg_match_all('', $file, $matches); foreach ($matches[1] as $value) { $file = str_replace('', $this->get_apib($this->location . $value . '.apib'), $file);