mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14285] Fix undefined property
PHPBB3-14285
This commit is contained in:
parent
0b136a6231
commit
5707d98682
4 changed files with 11 additions and 6 deletions
|
@ -87,7 +87,9 @@ services:
|
||||||
storage.controller.avatar:
|
storage.controller.avatar:
|
||||||
class: phpbb\storage\controller\avatar
|
class: phpbb\storage\controller\avatar
|
||||||
arguments:
|
arguments:
|
||||||
|
- '@cache'
|
||||||
- '@config'
|
- '@config'
|
||||||
|
- '@dbal.conn'
|
||||||
- '@storage.avatar'
|
- '@storage.avatar'
|
||||||
|
|
||||||
storage.controller.attachment:
|
storage.controller.attachment:
|
||||||
|
|
|
@ -34,9 +34,6 @@ class attachment extends controller
|
||||||
/** @var content_visibility */
|
/** @var content_visibility */
|
||||||
protected $content_visibility;
|
protected $content_visibility;
|
||||||
|
|
||||||
/** @var driver_interface */
|
|
||||||
protected $db;
|
|
||||||
|
|
||||||
/** @var dispatcher */
|
/** @var dispatcher */
|
||||||
protected $dispatcher;
|
protected $dispatcher;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace phpbb\storage\controller;
|
||||||
|
|
||||||
use phpbb\cache\service;
|
use phpbb\cache\service;
|
||||||
use phpbb\config\config;
|
use phpbb\config\config;
|
||||||
|
use phpbb\db\driver\driver_interface;
|
||||||
use phpbb\storage\storage;
|
use phpbb\storage\storage;
|
||||||
|
|
||||||
class avatar extends controller
|
class avatar extends controller
|
||||||
|
@ -24,10 +25,11 @@ class avatar extends controller
|
||||||
|
|
||||||
protected $allowed_extensions = ['png', 'gif', 'jpg', 'jpeg'];
|
protected $allowed_extensions = ['png', 'gif', 'jpg', 'jpeg'];
|
||||||
|
|
||||||
public function __construct(service $cache, config $config, storage $storage)
|
public function __construct(service $cache, config $config, driver_interface $db, storage $storage)
|
||||||
{
|
{
|
||||||
$this->cache = $cache;
|
$this->cache = $cache;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
$this->db = $db;
|
||||||
$this->storage = $storage;
|
$this->storage = $storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
namespace phpbb\storage\controller;
|
namespace phpbb\storage\controller;
|
||||||
|
|
||||||
|
|
||||||
use phpbb\cache\service;
|
use phpbb\cache\service;
|
||||||
|
use phpbb\db\driver\driver_interface;
|
||||||
use phpbb\storage\storage;
|
use phpbb\storage\storage;
|
||||||
|
|
||||||
class controller
|
class controller
|
||||||
|
@ -23,12 +23,16 @@ class controller
|
||||||
/** @var service */
|
/** @var service */
|
||||||
protected $cache;
|
protected $cache;
|
||||||
|
|
||||||
|
/** @var driver_interface */
|
||||||
|
protected $db;
|
||||||
|
|
||||||
/** @var storage */
|
/** @var storage */
|
||||||
protected $storage;
|
protected $storage;
|
||||||
|
|
||||||
public function __construct(service $cache, storage $storage)
|
public function __construct(service $cache, driver_interface $db, storage $storage)
|
||||||
{
|
{
|
||||||
$this->cache = $cache;
|
$this->cache = $cache;
|
||||||
|
$this->db = $db;
|
||||||
$this->storage = $storage;
|
$this->storage = $storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue