diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index a3c6bcc092..149621081f 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -172,12 +172,12 @@ function process_user_login_local($login, $pass, $api=false, $passAlreadyEncrypt $credentials_check = $pass === $row['password']; } else { // Perform password check whether it is MD5-hashed (old hashing) or Bcrypt-hashed. - if (strlen($row['password']) === 32) { + if (strlen(($row['password'] ?? '')) === 32) { // MD5. $credentials_check = $row !== false && $row['password'] !== md5('') && $row['password'] == md5($pass); } else { // Bcrypt. - $credentials_check = password_verify($pass, $row['password']); + $credentials_check = password_verify($pass, ($row['password'] ?? '')); } } diff --git a/pandora_console/vendor/artica/phpchartjs/src/ChartInterface.php b/pandora_console/vendor/artica/phpchartjs/src/ChartInterface.php index 94c18c3b56..3cb3c6425d 100644 --- a/pandora_console/vendor/artica/phpchartjs/src/ChartInterface.php +++ b/pandora_console/vendor/artica/phpchartjs/src/ChartInterface.php @@ -2,7 +2,7 @@ namespace Artica\PHPChartJS; -use Halfpastfour\Collection\CollectionInterface; +use Artica\PHPChartJS\Collection\CollectionInterface; /** * Interface ChartInterface diff --git a/pandora_console/vendor/artica/phpchartjs/src/Collection/ArrayAccess.php b/pandora_console/vendor/artica/phpchartjs/src/Collection/ArrayAccess.php new file mode 100644 index 0000000000..5795a78709 --- /dev/null +++ b/pandora_console/vendor/artica/phpchartjs/src/Collection/ArrayAccess.php @@ -0,0 +1,123 @@ +data ); + } + + /** + * Get a value from the given offset. + * + * @param mixed $offset The offset to get the value from. + * + * @return mixed + */ + public function offsetGet( $offset ) + { + if( $this->offsetExists( $offset ) ) { + return $this->data[ $offset ]; + } + + return null; + } + + /** + * Set a value at the given offset. + * + * @param mixed $offset The offset to set the value at. + * @param mixed $value The value to set. + * + * @return $this + */ + public function offsetSet( $offset, $value ) + { + $this->data[ $offset ] = $value; + + return $this; + } + + /** + * Unset a value at the given offset. Does nothing if the offset is not found. + * + * @param mixed $offset The offset to unset the value from. + * + * @return $this + */ + public function offsetUnset( $offset ) + { + if( $this->offsetExists( $offset ) ) { + unset( $this->data[ $offset ] ); + } + + return $this; + } + + /** + * Provide a callback to use for sorting the data. + * + * @param \Closure $callback The callback to be used. + * + * @return $this + */ + public function usort( \Closure $callback ) + { + usort( $this->data, $callback ); + reset( $this->data ); + + return $this; + } + + /** + * Sort the data by key. + * + * @param int $sortFlags Optional flags to provide to ksort. + * + * @return $this + */ + public function ksort( $sortFlags = null ) + { + ksort( $this->data, $sortFlags ); + + return $this; + } + + /** + * Count the rows of data the collection contains. + * + * @return int + */ + public function count() + { + return count( $this->data ); + } + + /** + * @return ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator( $this ); + } +} \ No newline at end of file diff --git a/pandora_console/vendor/artica/phpchartjs/src/Collection/ArrayAccessInterface.php b/pandora_console/vendor/artica/phpchartjs/src/Collection/ArrayAccessInterface.php new file mode 100644 index 0000000000..73d5c5868e --- /dev/null +++ b/pandora_console/vendor/artica/phpchartjs/src/Collection/ArrayAccessInterface.php @@ -0,0 +1,42 @@ +data = $data; + } + } + + /** + * Add a value to the beginning of the set of data. This will change existing keys. + * + * @param mixed $value The value to prepend. + * + * @return $this + */ + public function prepend( $value ) + { + array_unshift( $this->data, $value ); + + return $this; + } + + /** + * Add a value to the end of the set of data. + * + * @param mixed $value The value to append. + * + * @return $this + */ + public function append( $value ) + { + array_push( $this->data, $value ); + + return $this; + } + + /** + * Shift an element off of the left of the collection. + * + * @return mixed + */ + public function trimLeft() + { + return array_shift( $this->data ); + } + + /** + * Pop an element off of the right of the collection. + * + * @return mixed + */ + public function trimRight() + { + return array_pop( $this->data ); + } + + /** + * Should return an array containing all values. + * + * @return array + */ + public function getArrayCopy() + { + return $this->data; + } + + /** + * Should set the data for the collection and return the previous set of data. + * + * @param array $data + * + * @return array + */ + public function exchangeArray( array $data ) + { + // Gather return data + $returnArray = $this->getArrayCopy(); + // Set the new data + $this->data = $data; + + return $returnArray; + } + + /** + * Get (and create if not exists) an iterator. + * + * @return \ArrayIterator + */ + public function getIterator() + { + return new \ArrayIterator( $this->data ); + } +} \ No newline at end of file diff --git a/pandora_console/vendor/artica/phpchartjs/src/Collection/CollectionInterface.php b/pandora_console/vendor/artica/phpchartjs/src/Collection/CollectionInterface.php new file mode 100644 index 0000000000..1450b599b0 --- /dev/null +++ b/pandora_console/vendor/artica/phpchartjs/src/Collection/CollectionInterface.php @@ -0,0 +1,23 @@ +