forked from Public/pics
Address dynamic class property deprecation warnings
This commit is contained in:
@@ -13,6 +13,7 @@ class Asset
|
||||
protected $subdir;
|
||||
protected $filename;
|
||||
protected $title;
|
||||
protected $slug;
|
||||
protected $mimetype;
|
||||
protected $image_width;
|
||||
protected $image_height;
|
||||
@@ -364,7 +365,7 @@ class Asset
|
||||
|
||||
public function isImage()
|
||||
{
|
||||
return substr($this->mimetype, 0, 5) === 'image';
|
||||
return isset($this->mimetype) && substr($this->mimetype, 0, 5) === 'image';
|
||||
}
|
||||
|
||||
public function getImage()
|
||||
|
||||
@@ -12,6 +12,7 @@ class AssetIterator extends Asset
|
||||
private $res_assets;
|
||||
private $res_meta;
|
||||
private $res_thumbs;
|
||||
private Database $db;
|
||||
|
||||
protected function __construct($res_assets, $res_meta, $res_thumbs, $return_format)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ class Database
|
||||
private $connection;
|
||||
private $query_count = 0;
|
||||
private $logged_queries = [];
|
||||
private array $db_callback;
|
||||
|
||||
/**
|
||||
* Initialises a new database connection.
|
||||
|
||||
@@ -20,6 +20,13 @@ class GenericTable
|
||||
public $form_above;
|
||||
public $form_below;
|
||||
|
||||
private $sort_direction;
|
||||
private $sort_order;
|
||||
private $base_url;
|
||||
private $start;
|
||||
private $items_per_page;
|
||||
private $recordCount;
|
||||
|
||||
public function __construct($options)
|
||||
{
|
||||
// Make sure we're actually sorting on something sortable.
|
||||
|
||||
@@ -21,7 +21,7 @@ class Guest extends User
|
||||
$this->is_guest = true;
|
||||
$this->is_admin = false;
|
||||
$this->first_name = 'Guest';
|
||||
$this->last_name = '';
|
||||
$this->surname = '';
|
||||
}
|
||||
|
||||
public function updateAccessTime()
|
||||
|
||||
@@ -11,6 +11,7 @@ class PhotoMosaic
|
||||
private $queue = [];
|
||||
|
||||
const NUM_DAYS_CUTOFF = 7;
|
||||
private AssetIterator $iterator;
|
||||
|
||||
public function __construct(AssetIterator $iterator)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ class Thumbnail
|
||||
private $width;
|
||||
private $height;
|
||||
private $crop_mode;
|
||||
private string $filename_suffix;
|
||||
|
||||
const CROP_MODE_NONE = 0;
|
||||
const CROP_MODE_BOUNDARY = 1;
|
||||
|
||||
@@ -12,17 +12,20 @@
|
||||
*/
|
||||
abstract class User
|
||||
{
|
||||
protected $id_user;
|
||||
protected $first_name;
|
||||
protected $surname;
|
||||
protected $emailaddress;
|
||||
protected int $id_user;
|
||||
protected string $first_name;
|
||||
protected string $surname;
|
||||
protected string $slug;
|
||||
protected string $emailaddress;
|
||||
protected string $password_hash;
|
||||
protected $creation_time;
|
||||
protected $last_action_time;
|
||||
protected $ip_address;
|
||||
protected $is_admin;
|
||||
protected string $reset_key;
|
||||
|
||||
protected $is_logged;
|
||||
protected $is_guest;
|
||||
protected bool $is_logged;
|
||||
protected bool $is_guest;
|
||||
|
||||
/**
|
||||
* Returns user id.
|
||||
|
||||
Reference in New Issue
Block a user