laravel-registry icon indicating copy to clipboard operation
laravel-registry copied to clipboard

Registry::store() hardcodes table name

Open frasmage opened this issue 9 years ago • 0 comments

The Registry::store() method uses a prepared statement with a hardcoded table name

$this->database->statement("INSERT INTO system_registries ( `key`, `value` ) VALUES ( ?, ? ) ON DUPLICATE KEY UPDATE `key` = ?, `value` = ?",
        array($key, $jsonValue, $key, $jsonValue));

This causes the method to not work if the table name is changed. It should have $this->config['table'] concatenated into the statement.

frasmage avatar Nov 12 '15 21:11 frasmage