1 | <?php |
||
14 | class upload |
||
15 | { |
||
16 | /** @var \phpbb\auth\auth */ |
||
17 | protected $auth; |
||
18 | |||
19 | /** @var \phpbb\files\factory */ |
||
20 | protected $files_factory; |
||
21 | |||
22 | /** @var \phpbb\language\language */ |
||
23 | protected $language; |
||
24 | |||
25 | /** @var string */ |
||
26 | protected $phpbb_root_path; |
||
27 | |||
28 | /** @var array */ |
||
29 | protected $allowed_extensions = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'svg'); |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param \phpbb\auth\auth $auth Auth object |
||
35 | * @param \phpbb\files\factory $files_factory Files factory object |
||
36 | * @param \phpbb\language\language $language Language object |
||
37 | * @param string $phpbb_root_path phpBB root path |
||
38 | */ |
||
39 | 5 | public function __construct(\phpbb\auth\auth $auth, \phpbb\files\factory $files_factory, \phpbb\language\language $language, $phpbb_root_path) |
|
46 | |||
47 | /** |
||
48 | * @return \Symfony\Component\HttpFoundation\Response |
||
49 | */ |
||
50 | 5 | public function handle() |
|
78 | |||
79 | /** |
||
80 | * @param array $allowed_extensions |
||
81 | * @return void |
||
82 | */ |
||
83 | 5 | public function set_allowed_extensions(array $allowed_extensions) |
|
87 | |||
88 | /** |
||
89 | * @param \phpbb\files\filespec $file |
||
90 | * @return void |
||
91 | */ |
||
92 | 4 | protected function set_filename(\phpbb\files\filespec &$file) |
|
105 | |||
106 | /** |
||
107 | * @return \phpbb\files\filespec |
||
108 | */ |
||
109 | 4 | protected function get_file() |
|
123 | |||
124 | /** |
||
125 | * @param string $file |
||
126 | * @return void |
||
127 | */ |
||
128 | protected function set_file_permissions($file) |
||
132 | } |
||
133 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.