hpz
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: sql-error in sidebar links after upgrade to 2.2.2Otto42, unfortunately your proposed bugfix doesn’t solve the problem 🙁
I moved the blog to a server with PHP-4.4.8 and it worked 🙂
I can’t really say which PHP-function is buggy in php-4.3.2, probably array_merge() ???
I propose to add a note to the upgrade-guide, that there exists a problem at least with PHP-4.3.2. The hack for running with php-4.3.2 is, according to me, to insert the follwing line just before the extract() statement:unset($orderby); extract($r, EXTR_SKIP);in file wp-includes/category.php,
function &get_categories($args = '').Forum: Everything else WordPress
In reply to: sql-error in sidebar links after upgrade to 2.2.2This is really weired! When entering the function
isset($orderby)returns false. But a few lines furtherisset($orderby)returnstrue!?I haven’t had time yet to move to another PHP version, but I plan to do it as soon as possible.
So, what php version are the others running?
Thanks for your feedback.Forum: Everything else WordPress
In reply to: sql-error in sidebar links after upgrade to 2.2.2This problem just seems very poorly defined from reading this thread. You’re getting this error, okay, I get that. But under what circumstances? I mean, I can give you code that will produce that error every time, but unless you can get it with a completely default installation, it’s probably not a WordPress bug
I never claimed it to be a wordpress bug. This was a question, only.
That which cannot be reproduced cannot be fixed. Furthermore, hpz’s “fix” of eliminating the EXTR_SKIP shouldn’t actually work. All removing that does is open potential security holes.
The problem is the reproduction. This error seems only to come up under some special conditions. And that is the point, to find out, what these special conditions are.
I reanalysed these conditions and I came to the conclusion, that this error has to be related to my PHP-Version.
So, I’m running PHP-4.3.2 on RedHat 3 (php-4.3.2-39).
Let me quickly explain, why:
At the line 31 in file gategory.php (function get_categories), the statementextract($r, EXTR_SKIP);should create an entry$orderbyin the PHP-Symboltable, with the parameter to skip if there is already such an entry. And this is the problem, that there exists already a symbol$orderbywith the value ‘name’, so the extract()-function doesn’t override this one!!! I checked that by inserting the follwing statement just before line 31:
if (isset($orderby)) echo "</br>orderby before = $orderby</br>";and guess what appeared on my page?
orderby before = nameBut in the code there is absolutely no symbol ‘$orderby’ referenced before the line 31. So, where the hell comes this symbol?
To give another proof is to insert the following statement before line 31:
unset($orderby); extract($r, EXTR_SKIP);This fixes also the error! So to be more precise, this should probably be regarded as a hack for working with certain php-versions, rather than a wordpress fix.
It remains to check what PHP-Version others, having the same problem, are running.
Forum: Everything else WordPress
In reply to: sql-error in sidebar links after upgrade to 2.2.2I’m finally glad, that others have the same problem.
I verified again and I can confirm, that the problem is *not* related to the theme (wp_list_bookmarks), or at least not directly(?). The problem occurs also with the default wordpress theme.By debugging I came to the line 32 in file wp-includes/category.php, which I changed again:
//extract($r, EXTR_SKIP); extract($r);Maybe, the key to this problem lies in the reason for this modif? I don’t know..
Or might it even be related to some PHP version?If somebody else could verify if this fix works also for others?