mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-07 03:42:13 +02:00
fix the problem with opening empty files
This commit is contained in:
parent
9ab20b40da
commit
be86b68886
5
h-m-m
5
h-m-m
|
@ -455,6 +455,11 @@ function load_file(&$mm)
|
||||||
// won't cause any problems.
|
// won't cause any problems.
|
||||||
$new_nodes = list_to_map($lines, 0, 2);
|
$new_nodes = list_to_map($lines, 0, 2);
|
||||||
|
|
||||||
|
if (empty($new_nodes))
|
||||||
|
{
|
||||||
|
load_empty_map($mm);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// checking to see how many first-level nodes we have
|
// checking to see how many first-level nodes we have
|
||||||
$first_level_nodes = [];
|
$first_level_nodes = [];
|
||||||
|
|
Loading…
Reference in a new issue