We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd0cc84 commit 88edee5Copy full SHA for 88edee5
data/invalid-shp.shp
1.3 KB
src/ShapeFile.php
@@ -279,7 +279,7 @@ private function _deleteRecordFromDBF($index) {
279
}
280
281
private function _loadHeaders() {
282
- if (Util::loadData('N', $this->readSHP(4)) != 9994) {
+ if (Util::loadData('N', $this->readSHP(4)) != 0x270a) {
283
$this->setError('Not a SHP file (file code mismatch)');
284
return false;
285
tests/ShapeFileTest.php
@@ -91,6 +91,7 @@ public function provideErrorFiles()
91
$result = array(
92
array('data/no-shp.*'),
93
array('data/missing.*'),
94
+ array('data/invalid-shp.*'),
95
);
96
97
if (ShapeFile::supports_dbase()) {
0 commit comments