The Joomla! Forum ™



Forum rules


Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed May 30, 2012 2:46 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed May 30, 2012 2:22 pm
Posts: 3
Location: Wien, Austria
Hi,
Description:
I've found some unnecessary lines inside the Joomla 1.5.26 core code which cause warnings with PHP > 5.4.0
Who is responsible to change this behaviors?

File: administrator/components/com_content/controller.php
Line: 96
Code:
      if ($filter_sectionid >= 0) {
         $filter = ' WHERE cc.section = '. (int) $filter_sectionid;
      }
      $section->title = 'All Articles';
      $section->id = 0;

      /*

change to
Code:
      if ($filter_sectionid >= 0) {
         $filter = ' WHERE cc.section = '. (int) $filter_sectionid;
      }
      // $section->title = 'All Articles';
      // $section->id = 0;

      /*


And also the file: administrator/components/com_content/models/element.php
line 85
Code:
      }
      $section->title = 'All Articles';
      $section->id = 0;

      /*

change to
Code:
      }
      // $section->title = 'All Articles';
      // $section->id = 0;

      /*


Tested and online at http://www.loytec.com
Best regards
Thomas Kuschel


Top
 Profile  
 
PostPosted: Mon Jun 04, 2012 11:52 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Wed Aug 17, 2005 10:27 pm
Posts: 14709
Location: Kent, England
[Mod Note: Please advise the warnings you are currently getting.]


Top
 Profile  
 
PostPosted: Mon Jun 04, 2012 12:24 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed May 30, 2012 2:22 pm
Posts: 3
Location: Wien, Austria
Hi, thanks for your reply.
Working with php5.4.0-3 (cli), Joomla 1.5.26
I got following note, after opening the Article Manager (backend):
( ! ) Warning: Creating default object from empty value in /xxx/cms/joomla/administrator/components/com_content/controller.php on line 96
Call Stack
# Time Memory Function Location
1 0.0009 136596 {main}( ) ../index.php:0
2 0.1097 2789944 JAdministrator->dispatch( ) ../index.php:67
3 0.1165 3028244 JComponentHelper->renderComponent( ) ../application.php:136
4 0.1254 3099320 require_once( '/xxx/cms/joomla/administrator/components/com_content/admin.content.php' ) ../helper.php:162
5 0.1358 3542156 ContentController->viewContent( ) ../admin.content.php:131

I know, I could get rid of that warning doing a declaration of e.g.
Code:
if(empty($section)){
$section = new stdClass();
}

in front of the code; but I'm wondering about these two lines:
Code:
      $section->title = 'All Articles';
      $section->id = 0;

===
Thomas


Top
 Profile  
 
PostPosted: Fri Sep 14, 2012 3:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Sep 14, 2012 2:59 pm
Posts: 2
Location: Germany
I run into the same problem after switching over to php 5.4.5. What does the error message means and how to get rid off it? I'm not a php-expert.

Thxs.


Top
 Profile  
 
PostPosted: Tue Sep 18, 2012 4:43 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Fri Sep 14, 2012 2:59 pm
Posts: 2
Location: Germany
Can anyone help please?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 



Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group