Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Error on global
Hello,
trying to implement some function that hooks zem_contact, I’m following the guidelines on this page but I get an error regarding the global declaration global zem_contact_form;
This is the error I get (4.5.4): Parse error: syntax error, unexpected ‘zem_contact_form’ (T_STRING), expecting variable (T_VARIABLE) or ‘$’
I’m putting the global prefix outside any function, but within the plugin.
Any suggestion?
Thanks!
Offline
Re: Error on global
must use a variable:
global $zem_contact_form;
Offline
Re: Error on global
Grazie Marco!
I’m having still some troubles following the API guides,
global $zem_contact_form;
$evaluator = &get_zemcontact_evaluator();
This returns Fatal error: Call to undefined function get_zemcontact_evaluator()
Any idea?
Thanks a lot
Offline
Re: Error on global
Ci vuole lo spazio:
$evaluator =& get_zemcontact_evaluator();
L’ho scoperto anche io ora: =& è un operatore di assegnazione in php!!
$a = 42;
$b =& $a;
//later
echo $a; // 42
echo $b; // 42
$a = 13;
echo $a; // 13
echo $b; // 13
Must use $evaluator =& get_zemcontact_evaluator();
=&
is an assigment operator by reference
Offline
Re: Error on global
Ciao,
thanks, it returns unknown function as well, even in the correct form as you suggest
(che bello parlare la propria lingua) ;)
Offline
Pages: 1