Skip to content

Commit a714897

Browse files
committed
Check whether header is array prior to counting it
Signed-off-by: Michal Čihař <[email protected]>
1 parent 9194b28 commit a714897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ShapeFile.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ private function _closeSHXFile()
525525
*/
526526
private function _createDBFFile()
527527
{
528-
if (!self::supports_dbase() || count($this->DBFHeader) == 0) {
528+
if (!self::supports_dbase() || !is_array($this->DBFHeader) || count($this->DBFHeader) == 0) {
529529
$this->DBFFile = null;
530530

531531
return true;

0 commit comments

Comments
 (0)