Skip to content

Should not fail is there is no dbf fileΒ #36

@JoolsMcFly

Description

@JoolsMcFly

Hi.

This lib handles shape files with no dbf files if dbase is not installed on the server. If dbase is installed and no dbf is found then lib bails out and doesn't process the shape file.

dbase is installed on our server but some of our clients do not include a dbf file so we cannot process their Shape file. Bit of a bummer!

It would be better, IMHO, to just proceed without dbf just like what happens without dbase.

So it basically boilds down to changing the following code

$dbfName = $this->getFilename('.dbf');
if (! is_readable($dbfName)) {
    $this->setError(sprintf('It wasn\'t possible to find the DBase file "%s"', $dbfName));

    return false;
}

so that it returns true;

$dbfName = $this->getFilename('.dbf');
if (! is_readable($dbfName)) {
    $this->setError(sprintf('It wasn\'t possible to find the DBase file "%s"', $dbfName));

    return true;
}

What do you think?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions