Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

notice undefined variable: child_information Error


xareelat

Recommended Posts

hello.have this problem on my site. notice undefined variable: child_information in ...public_html/includes/functions/information.php online 44

 

line 44

$count_child = count($child_information);

 

I want to thank

Link to comment
Share on other sites

Check the information table in your database. Are there any entries? If not, go to your admin and add at least one information page.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 11 months later...

I am experiencing the same error as above with this contribution

 

Information Pages Unlimited 2.07

 

The error is being reported by KissER Error Handling

 

	// Retrieve information from db
// ID set by module for Information box
$information_query = tep_db_query("SELECT information_id, information_title, parent_id FROM " . TABLE_INFORMATION . " WHERE visible='1' and language_id='" . (int)$languages_id ."' and information_group_id = '" . (int)$information_group_id . "' ORDER BY sort_order");
while($information = tep_db_fetch_array($information_query)) {
	$information_tree[$information['information_id']] = array(
		'info_title' 	=> $information['information_title'],
		'parent_id' 	=> $information['parent_id'],
		'info_next_id' 	=> 0
	);
	if ($information_tree[$information['information_id']]['parent_id'] != '0') {
		$child_information[] = array (
			'parent_info_id' => $information['parent_id'],
			'child_info_id'  => $information['information_id']
		);
	}
}
$count_child = count($child_information);

 

I have 5 pages already inserted into the database so its not an empty table that is causing the problem.

 

Any ideas?

 

Thanks

 

Mark

Link to comment
Share on other sites

If you have no page with children (sub-pages) then that error makes sense. The fix is to add this above the code you posted:

 

$child_information) = array();

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

If you have no page with children (sub-pages) then that error makes sense. The fix is to add this above the code you posted:

 

$child_information) = array();

Regards

Jim

 

Cheers Jim, works minus the )

 

Mark :thumbsup:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...