Re: Undefined class constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Sep 2007 15:56:22 +0300, Puiu Hrenciuc <hpuiu@xxxxxxxxx> wrote:
> Hi everyone,
> 
> I'm having a hard time dealing with an error that appeared overnight
> in one of my PHP script:
> 
> Fatal error: Undefined class constant 'self::TYPE_HIDDEN' in
> /#########/classes/framework/HTML/HTMLForm.php on line 120
> 
> HTMLForm.php snippet:
> 
> .........
> // Creates the HTMLFormFields
> foreach ($this->Record->Columns as $_column)
> {
> 	// Add only visible columns
> 	if ($_column->IsVisible)
> 	{
> 		// Default field type
> 		$_type=HTMLFormField::ELEMENT_TYPE_TEXT ;
> 
>                  // Adjust default type based on Column type
>                  switch ($_column->Type)
>                  {
>                  	case Column::TYPE_AUTONUMBER:
>                     			  $_type=HTMLFormField::ELEMENT_TYPE_HIDDEN ;
>                            break;
> 
> 			case Column::TYPE_BOOLEAN :
>                            $_type=HTMLFormField::ELEMENT_TYPE_CHECKBOX ;
>                            break;
>                          default:
>                            break;
> 117:           }
> 118:
> 119:		// Add the column to the list of fields
> 120:		$this->Fields[$_column->Name]=new
> 121:			HTMLFormField($this->Name,$_column,$_type);
> 122:
> 123:	}
> 
> }
> 
> As you can see there is no refference to any TYPE_HIDDEN constant
> at line 120, nor in the HTMLFormField's constructor.
> 
> I searched the net, but I just can't find the reason of this.
> Can someone please help me ?
> 
> Thanks,
> Puiu

When the error happens. What are the contents of 120: $_column->Name ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux