Skip to content

Commit b110a38

Browse files
author
Ibrahim BinAlshikh
committed
fix: correct parent constructor call and static method usage in ExtendedWebServicesManager
- Pass null as first argument to parent::__construct() since WebServicesManager expects ?Request as first parameter, not string. - Use $this->getRequest()->getMethod() instead of static Request::getMethod() which is not a static method. Fixes #296
1 parent 007c799 commit b110a38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

WebFiori/Framework/ExtendedWebServicesManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class ExtendedWebServicesManager extends WebServicesManager {
3535
* @since 1.0
3636
*/
3737
public function __construct(string $version = '1.0.0') {
38-
parent::__construct($version);
38+
parent::__construct(null, $version);
3939
$this->setTranslationHelper();
4040
$langCode = $this->getTranslation()->getCode();
4141
$generalDir = 'general';
@@ -216,7 +216,7 @@ public function setLangVars($dir,$arr = []) {
216216
* Set the language at which the API is going to use for the response.
217217
*/
218218
private function setTranslationHelper() {
219-
$reqMeth = Request::getMethod();
219+
$reqMeth = $this->getRequest()->getMethod();
220220
$activeSession = SessionsManager::getActiveSession();
221221

222222
if ($activeSession !== null) {

0 commit comments

Comments
 (0)