[ewiki] Re: php global variable name length limit
- From: "Mario Salzer" <mario@xxxxxxxxxxxxx>
- To: ewiki@xxxxxxxxxxxxx
- Date: Thu, 27 Nov 2003 15:35:51 +0100
Hey!
Andy:
> It seems that there might be a limit on a variable name length, I changed
> aview_linktree, line 79:
> to:
> $GLOBALS["ewiki_pgsec"][] = $tree[1];
> and it started working. With the first name nothing was getting stored in
> $GLOBALS["ewiki_page_sections"][]. Any ideas? Can we commit this as a
> patch?
I had no problems with this, so I'd say this is a PHP or Zend bug instead, and
you should
file it on //bugs.php.net/ and you should of course upgrade to a newer PHP
version if
possible, so you won't get damages caused by some sporadically occouring bugs.
Which
PHP version are you using?
I don't think we should overshorten var names just because it broke here, if
you need this workaround, you should then first create a variable reference in
global scope, like:
$ewiki_pgsec = array();
$ewiki_page_section = & $ewiki_pgsec;
So you needed the above workaround only as long as you don't upgrade the plugin
or your PHP interepreter.
> Re: [ewiki] edit_save hooks
> Can we define that an edit_save plugin must:
> 1. Behave in a safe manner when called without its $_REQUEST variables
> being set.
> 2. Behave in a default manner when called with version 1 set in $data and
> no $_REQUEST variables.
This is how most ["edit_save"] plugins already work. However those plugins are
free to
damage the $data array whenever they feel that way (auth plugins may choose to
completely abondon page saving, if the page name or something else does not
fit in
the security rules). So you should not care about that either, because it is in
fact possible
and senseful that plugins may be incompatible to each other.
> I need some way to have my rights system set default rights for stub pages
> in threads and iterating across the edit_save plugins seems like a suitable
> way to do it without making the threads plugin truly aware of the perms
> plugin.
There is no need to wait vor version 1 or to check for $_REQUEST[] stuff, if
you wish
to add defaults into the {meta} field. You can do that, whenever your plugin
believes
a default value is better than no value at all.
mario
______________________________________________________________________________
WEB.DE FreeMail wird 5 Jahre jung! Feiern Sie mit uns und
nutzen Sie die neuen Funktionen http://f.web.de/features/?mc=021130
Other related posts: