Skip to content

Commit 845a428

Browse files
committed
remove safety check, not needed
1 parent 3766761 commit 845a428

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/Ifsnop/Mysqldump/Mysqldump.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function parseDsn($dsn)
237237
}
238238

239239
$this->dsn = $dsn;
240-
$this->dbType = strtolower(substr($dsn, 0, $pos));
240+
$this->dbType = strtolower(substr($dsn, 0, $pos)); // always returns a string
241241

242242
if (empty($this->dbType)) {
243243
throw new Exception("Missing database type from DSN string");
@@ -264,11 +264,6 @@ private function parseDsn($dsn)
264264

265265
$this->dbName = $this->dsnArray['dbname'];
266266

267-
// safety check
268-
if ( !is_string($this->dbType) ) {
269-
throw new Exception("Invalid database type definition in DSN string");
270-
}
271-
272267
return true;
273268
}
274269

0 commit comments

Comments
 (0)