Menu

#11 Convert to PHP5 - php fatal error

open
nobody
None
5
2004-10-04
2004-10-04
No

Platform is Freebsd php 5 and mysql 4.0

Changes from php4 and php 5 as indicated in php thin
changes file state

*Illegal use of string offsets causes E_ERROR instead of
E_WARNING.

Fatal error: Cannot use string offset as an array
in /usr/local/www/acid/acid_state_citems.inc on line 694

I am not a coder, but willing to make changes to get this
to work with PHP 5.

Line 694

function SanitizeElement($i)
{
$this->criteria[$i][0] = CleanVariable($this->criteria
[$i][0], VAR_OPAREN)
;
$this->criteria[$i][1] = CleanVariable($this->criteria
[$i][1], "", array("
=", "!=", "<", "<=", ">", ">="));
$this->criteria[$i][2] = CleanVariable($this->criteria
[$i][2], VAR_DIGIT);
$this->criteria[$i][3] = CleanVariable($this->criteria
[$i][3], VAR_DIGIT);
$this->criteria[$i][4] = CleanVariable($this->criteria
[$i][4], VAR_DIGIT);
$this->criteria[$i][5] = CleanVariable($this->criteria
[$i][5], VAR_DIGIT);
$this->criteria[$i][6] = CleanVariable($this->criteria
[$i][6], VAR_DIGIT);
$this->criteria[$i][7] = CleanVariable($this->criteria
[$i][7], VAR_DIGIT);
$this->criteria[$i][8] = CleanVariable($this->criteria
[$i][8], VAR_OPAREN
| VAR_CPAREN);

From what I have read the Square Brackets are no
longer used for arrays and instead the use { }, I tried
changing these and get the same error.

All examples I have seen do not use CleanVariable or
criteria

Is there something I can do to get this working?

TKS
A

Discussion


Log in to post a comment.

Auth0 Logo