Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne][PHP]Undefined variable 'object' less - Problem
kriskrkpl
post
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 24.08.2015

Ostrzeżenie: (0%)
-----


Witam serdecznie wszystkich na forum smile.gif

Potrzebuje pomocy w zloklizowanu błędu.

Używam PHP Storm, który zwraca mi następujący problem:

Undefined variable 'object' less... (Ctrl+F1)
The inspection can produce two types of warnings:
The definition of the variable can not be found anywhere. ("Undefined variable")
There are one or more pathes to rich the line with the variable usage without defining it. ("Variable might have not been defined")
All variables from files that contain 'include' or 'require' are considered as defined if the option "Ignore 'include' and 'require' statements" is disabled. The inspection is enabled for global space by default.

Z kolej przeglądarka zwraca mi problem

Fatal error: Call to a member function isAccessible() on null in /public_html/Core/Base/Front.php on line 359

O to kod tego pliku :

  1.  
  2. ....( Górna część kodu )
  3. public function dispatch($controller, $action, $params, $moduleCall)
  4. {
  5. $request = $this->getRequest();
  6. $this->setHelpersPathBase();
  7. $response = $this->getResponse();
  8.  
  9. if ($this->getRequest()->getQuery("widget")) {
  10. $module = $this->formatNamespaceName($this->getRequest()->getQuery("widget"));
  11. $isAccessible = (strtolower($module) == "widget" ? true : $object = $this->getApplication()->getModules($module) instanceof Module && $object->isAccessible());
  12.  
  13. if (!$isAccessible) {
  14. return NULL;
  15. }
  16.  
  17. $disableOb = $this->getParam("disableOutputBuffering");
  18. $obLevel = ob_get_level();
  19.  
  20. if ($disableOb) {
  21. }
  22.  
  23. $this->getApplication()->getEvent()->trigger("onBeforeDispatch." . $module);
  24.  
  25. try {
  26. echo Action::getInstance()->widget($this->getRequest()->getQuery("widget"), $this->getRequest()->getQuery("options"));
  27. }
  28. catch (\Core\Exception $e) {
  29. $curObLevel = ob_get_level();
  30.  
  31. ........( dalsza część kodu )


W czym leży problem questionmark.gif

Proszę o pomoc

Ten post edytował kriskrkpl 29.08.2015, 14:04:19
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 11:18