|
|
Error when previewing with 0.4.2?
- General Posted by A. Eriksson (Friday October 20 2000 @ 04:37AM EDT) views: 114 |
I´m getting following error when trying to preview a post:
Warning: Illegal string index in include/common.inc.php on line 103
This "error" seems to be located in F_genSummary:
function F_genSummary($doo) {
global $CONF; line 103 if ($doo[$CONF["SummaryLength"]] != " ") {
$dowords = 1;
}
if ($dowords) {
$words = explode(" ", $doo);
$stop = 0;
$tmpcnt = 0;
$wordcount = count($words);
while ($stop == 0) {
$summ = $summ . " " . $words[$tmpcnt];
if (strlen($summ) > $CONF["SummaryLength"]) {
$stop = 1;
} elseif (count($words)
What could be wrong? The last (0.4.1) F_genSummary worked fine...
|
|
By jason (Friday October 20 2000 @ 05:37PM EDT)
|
F_genSummary was added in 0.4.1. Apparently not all versions of php like what I did here, so try this for a fix:
replace:
if ($doo[$CONF["SummaryLength"]] != " ") {
with:
$foo = $CONF["SummaryLength"];
if ($doo[$foo] != " ") {
This should work, and is probablya better way of doing this.
|
[ reply | parent ]
|
By Mark (Tuesday January 02 2001 @ 07:10PM EST)
|
I made the changes above to my install of 0.4.2 and it still gives me an error. I noted that when I put a character in the Summary field I did not get an error.
Any ideas??
|
[ reply | parent ]
|
By Mark (Tuesday January 02 2001 @ 07:20PM EST)
|
$foo = $CONF["SummaryLength"];
if ($doo[$foo] != " ") {
should be
$foo = $CONF["SummaryLength"];
if ($doo[$doo] != " ") {
|
[ reply | parent ]
|
|
|
|