Commit cf51ceca authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4969 (Error if trying to edit a missing block)

parent 9b442f1a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -598,6 +598,10 @@ function get_block_parameters($block, $include_standard_parameters = false)
    if (is_null($info)) {
        $params = array();

        if (!is_file($block_path)) {
            warn_exit(do_lang_tempcode('MISSING_BLOCK_FILE', escape_html($block)));
        }

        $contents = file_get_contents($block_path);
        $matches = array();
        $num_matches = preg_match_all('#\$map\[\'(\w+)\'\]#', $contents, $matches);