rudie dirkx - 2006-10-26 07:14:10
Hi,
I got a few errors. Three I think... Two were nasty!
1. interface Countable didn't exist! Maybe you use a newer PHP or an extension in which its loaded automatically, but I dont. So I created it myself
[code]<?php
interface Countable
{
function count();
}
?>[/code]
-- Error fixed
2. index SCRITP_URL doesnt exist. It was used for the attribute action in the form tag. My $_SERVER array doesn't contain SCRIPT_URL, so I made it, using SCRIPT_NAME from the _SERVER array.
[code]<?php
$_SERVER['SCRIPT_URL'] = $_SERVER['SCRIPT_NAME'];
?>[/code]
-- Error fixed
3. public function Display in class SForm (extending SForm_Container) takes a parameter of form SForm_Renderer. Your default value was NULL. It can;t be null, since that's not a valid form of SForm_Renderer! But it's not called with a parameter, so it must have a default. So I deleted the 'reference' to its form SForm_Renderer.
Codes:
it was:
[code]<?php
public function display( SForm_Renderer $rend = null )
?>[/code]
and it is now
[code]<?php
public function display( $rend = null )
?>[/code]
-- Error fixed
Great class though :)
Just curious about the interface Countable and your PHP version...