[BlueOnyx:13754] Re: Fatal error: Cannot redeclare class Collator in /usr/sausalito/ui/libPhp/Collator.php on line 11
Vrushi, Armando
avrushi at logicshpk.al
Sat Sep 28 03:29:10 -05 2013
Hi everyone,
I use blueonyx since many years and is not the first time facing this
problem.
I don't understand where it cames from but it seems that the class is
declared elsewhere.
Doing a grep -ri "Collator" /usr/sausalito comes out:
/usr/sausalito/ui/libPhp/uifc/HtmlComponent.php: // param: collator: a
Collator object
/usr/sausalito/ui/libPhp/uifc/HtmlComponent.php: function
collate($valueA, $valueB, $collator) {
/usr/sausalito/ui/libPhp/uifc/HtmlComponent.php: return
$collator->collateStrings($valueA, $valueB, $collator);
/usr/sausalito/ui/libPhp/uifc/ScrollList.php:
include_once('Collator.php');
/usr/sausalito/ui/libPhp/uifc/ScrollList.php: $collator = new
Collator();
/usr/sausalito/ui/libPhp/uifc/ScrollList.php: $collator->sort($keys,
$entries);
/usr/sausalito/ui/libPhp/Collator.php:// $Id: Collator.php 259
2004-01-03 06:28:40Z shibuya $
/usr/sausalito/ui/libPhp/Collator.php:global $isCollatorDefined;
/usr/sausalito/ui/libPhp/Collator.php:if($isCollatorDefined)
/usr/sausalito/ui/libPhp/Collator.php:$isCollatorDefined = true;
/usr/sausalito/ui/libPhp/Collator.php:class Collator {
/usr/sausalito/ui/libPhp/Collator.php: // param: collator: a Collator
object
/usr/sausalito/ui/libPhp/Collator.php: function
collateNumbers($valueA, $valueB, $collator) {
/usr/sausalito/ui/libPhp/Collator.php: // param: collator: a Collator
object
/usr/sausalito/ui/libPhp/Collator.php: function
collateStrings($valueA, $valueB, $collator) {
We see that the file Collator.php is requested only once and the class
Collator declared only once.
The error looks strange but the solution is strange also.
I changed the class declared to Collatore in Collator.php and the
object creation in ScrollList.php accordingly ($collator = new
Collatore();)
and after that everything worked fine.
--
Armando Vrushi
CTO
Logic sh.p.k.
Rr. Ali Demi, p. 4, shk. 2, ap. 13
Tirane
More information about the Blueonyx
mailing list