Address dynamic class property deprecation warnings
This commit is contained in:
parent
49390c372d
commit
7897172256
@ -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.
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
class AlbumButtonBox extends SubTemplate
|
||||
{
|
||||
private $buttons;
|
||||
|
||||
public function __construct($buttons)
|
||||
{
|
||||
$this->buttons = $buttons;
|
||||
|
@ -8,6 +8,11 @@
|
||||
|
||||
class AlbumHeaderBox extends SubTemplate
|
||||
{
|
||||
private $back_link_title;
|
||||
private $back_link;
|
||||
private $description;
|
||||
private $title;
|
||||
|
||||
public function __construct($title, $description, $back_link, $back_link_title)
|
||||
{
|
||||
$this->title = $title;
|
||||
|
@ -8,6 +8,10 @@
|
||||
|
||||
class Alert extends SubTemplate
|
||||
{
|
||||
private $_type;
|
||||
private $_message;
|
||||
private $_title;
|
||||
|
||||
public function __construct($title = '', $message = '', $type = 'alert')
|
||||
{
|
||||
$this->_title = $title;
|
||||
|
@ -8,6 +8,10 @@
|
||||
|
||||
class DummyBox extends SubTemplate
|
||||
{
|
||||
private $_class;
|
||||
private $_content;
|
||||
private $_title;
|
||||
|
||||
public function __construct($title = '', $content = '', $class = '')
|
||||
{
|
||||
$this->_title = $title;
|
||||
|
@ -8,6 +8,15 @@
|
||||
|
||||
class FormView extends SubTemplate
|
||||
{
|
||||
private $content_below;
|
||||
private $content_above;
|
||||
private $data;
|
||||
private $missing;
|
||||
private $fields;
|
||||
private $request_method;
|
||||
private $request_url;
|
||||
private $title;
|
||||
|
||||
public function __construct(Form $form, $title = '')
|
||||
{
|
||||
$this->title = $title;
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
class MediaUploader extends SubTemplate
|
||||
{
|
||||
private Tag $tag;
|
||||
|
||||
public function __construct(Tag $tag)
|
||||
{
|
||||
$this->tag = $tag;
|
||||
|
@ -10,6 +10,7 @@ class Pagination extends SubTemplate
|
||||
{
|
||||
private $index;
|
||||
private static $unique_index_count = 0;
|
||||
private string $class;
|
||||
|
||||
public function __construct(PageIndex $index)
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ class PhotosIndex extends SubTemplate
|
||||
{
|
||||
protected $mosaic;
|
||||
protected $show_edit_buttons;
|
||||
protected $show_headers;
|
||||
protected $show_labels;
|
||||
protected $row_limit = 1000;
|
||||
protected $previous_header = '';
|
||||
|
@ -8,6 +8,9 @@
|
||||
|
||||
class TabularData extends SubTemplate
|
||||
{
|
||||
private Pagination $pager;
|
||||
private GenericTable $_t;
|
||||
|
||||
public function __construct(GenericTable $table)
|
||||
{
|
||||
$this->_t = $table;
|
||||
|
Loading…
Reference in New Issue
Block a user