Small cleanups.
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 15 Jan 2018 21:45:50 +0000 (22:45 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 15 Jan 2018 21:45:50 +0000 (22:45 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
lib/db.php
lib/utils.php

index 6c102c3855852b61e7b1a986843dc4f22e2fd2e4..c7c2d48c71f9cb45e756b1151576b7e125e36c1a 100644 (file)
@@ -20,8 +20,7 @@ class CustomDB
      */
     public function __construct($host, $username, $password, $dbname)
     {
-        $connection = new mysqli($host, $username, $password, $dbname);
-        $this->connection = $connection;
+        $this->connection = new mysqli($host, $username, $password, $dbname);
 
         if (!$this->connection->connect_errno) {
             $this->connected = true;
index 786c10e01cba770cdbd0b1e8bdcb69c4fbe32e5b..8fdb0aa66d7834a235d0d8ce05d08a1d6e965df6 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 function is_post_request()
 {
     if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {