system.php, line 155 & line

0 views
Skip to first unread message

Leechael

unread,
Jan 8, 2009, 11:06:08 AM1/8/09
to php-outline
line 155:
list($var, $from, $to, $by) = array($exp[1], $exp[2], $exp[3], (!isset
($exp[5]) ? 1 : $exp[5]));

If $exp[5] hasn't been provided, an error occurs; also this problem
resolved by the at sign('@'), but it isn't cleanly. Codes above can
resolve this problem perfectly.

line 186:
$this->foreach_stack[] = crc32($args);

I think do simple hashing here is ok. Maybe this alteration slower
than original codes, but it's more safe.The original version:

explode(" ", $args, 2) // other codes in this line are not
important....

will triggers an error, cause the third parameter must be a variable.

Also I added url encode function to modifiers.php, I think it's
helpful:

function outline__urlencode ($str)
{
return urlencode($str);
}

Leechael

unread,
Jan 8, 2009, 11:14:15 AM1/8/09
to php-outline
I think set error_reporting = E_ALL | E_STICT in php.ini and ignore
error control operator ('@') will be helpful. Also Outline is fast
enough, but I just feel it can be faster. :)

For example, don't rely on Object-Oriented heavily, some operations
can be lazily, more logical conditions determining, and I had said
above, ignore error control operator, and more.

I hope this message will be helpful. :)
Reply all
Reply to author
Forward
0 new messages