mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
fixing an unhandled case found with scrutinizer-ci
This commit is contained in:
parent
c13caee981
commit
b8080acc78
|
@ -30,7 +30,7 @@ class model_comment extends model_abstract
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return stdObject
|
* @return stdClass
|
||||||
*/
|
*/
|
||||||
public function get()
|
public function get()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,11 +22,13 @@ class model_paste extends model_abstract
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return stdObject
|
* @return stdClass
|
||||||
*/
|
*/
|
||||||
public function get()
|
public function get()
|
||||||
{
|
{
|
||||||
$this->_data = $this->_store->read($this->getId());
|
$this->_data = $this->_store->read($this->getId());
|
||||||
|
if ($this->_data === false) throw new Exception(zerobin::GENERIC_ERROR, 64);
|
||||||
|
|
||||||
// check if paste has expired and delete it if neccessary.
|
// check if paste has expired and delete it if neccessary.
|
||||||
if (property_exists($this->_data->meta, 'expire_date'))
|
if (property_exists($this->_data->meta, 'expire_date'))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user