Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZEND Framewor]Strict Standards: Creating default object from empty value
Ilware
post 20.12.2010, 00:56:37
Post #1





Grupa: Zarejestrowani
Postów: 248
Pomógł: 31
Dołączył: 14.12.2010
Skąd: Wrocław

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


Witam,

nie wiem czy to pytanie zamieszczam w dobrym dziale, ale szukałem już chyba wszędzie odpowiedzi, i nic nie znalazłem.

Zaczynam naukę framework'a więc proszę o wyrozumiałość w błędach żółtodzioba. Sprawa wygląda tak że wyświetla mnie się błąd po załączeniu skryptu

błąd:
Strict Standards: Creating default object from empty value in C:\wamp\www\ZEND\application\controllers\IndexController.php on line 4

kod jaki mam to

plik IndexController.php

  1. <?php
  2. class IndexController extends Zend_Controller_Action {
  3. function indexAction() {
  4. $this->view->title = "My Albums";
  5. }
  6.  
  7. function addAction() {
  8. $this->view->title = "Add New Album";
  9. }
  10.  
  11. function editAction() {
  12. $this->view->title = "Edit Album";
  13. }
  14.  
  15. function deleteAction() {
  16. $this->view->title = "Delete Album";
  17. }
  18. }


plik index.php

  1. <?php
  2. error_reporting(E_ALL|E_STRICT);
  3. date_default_timezone_set('Europe/London');
  4. set_include_path('.' . PATH_SEPARATOR . './library'
  5. . PATH_SEPARATOR . './application/models/'
  6. . PATH_SEPARATOR . get_include_path());
  7.  
  8. include "Zend/Loader.php";
  9. Zend_Loader::loadClass('Zend_Controller_Front');
  10. Zend_Loader::loadClass('Zend_Controller_Action'); // to załączyłem bo wywalało błąd Fatal error: Class 'Zend_Controller_Action' not found,
  11. // da się to jakoś ominąć czy wszystkie klasy trzeba załączać osobno?
  12.  
  13.  
  14. $frontController = Zend_Controller_Front::getInstance();
  15. $frontController->throwExceptions(true);
  16. $frontController->setParam('noViewRenderer', true);
  17. $frontController->setParam('useDefaultControllerAlways', true);
  18. $frontController->setControllerDirectory('./application/controllers');
  19.  
  20. $frontController->dispatch();


co zrobić z tym błędem?bardzo proszę o pomoc


--------------------
Jeżeli pomogłem kliknij "Pomógł" :)
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 Wersja Lo-Fi Aktualny czas: 24.07.2025 - 16:35