From 296beef0122e6e0ed0336f619f3c69945df514b9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 14 Oct 2020 11:00:27 +0200 Subject: [PATCH] avoid warning on count. fixes #29 --- syntax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax.php b/syntax.php index c2df3ca..4aa1999 100644 --- a/syntax.php +++ b/syntax.php @@ -456,7 +456,7 @@ function _parseColumnNames() { } } $this->cols = $newCols; - if(count($this->opts ["hdrs"]) != count($this->cols)) { + if(isset($this->opts["hdrs"]) && count($this->opts["hdrs"]) != count($this->cols)) { $this->_showDebugMsg( "The number of specified headers (".count($this->opts ["hdrs"]). ") is not equal to the number of specified columns (".