MediaWiki + SimpleFeed kiegészítő
Sziasztok!
Hálás lennék a segítségetekért, mert már lassan egy egész napot áldoztam arra, hogy kezdjek valami a hibával, de nem jutottam semmire. Előrebocsátom, hogy nem értek a PHP-hez, de nem is idegenkedek ettől. Remélem, van köztetek olyasvalaki, aki járatos ebben a wikiben (v1.12).
Tehát a probléma: Installáltam a SimpleFeed RSS olvasó kiegészítőt, melyről bővebben itt lehet olvasni. Külön felhívnám a figyelmeteket az itt elérhető simplepie.inc fájlra, melynek még komoly szerepe lesz a későbbiekben.
Annak rendje és módja szerint installáltam a kiegészítőt, de az oldalon, amire elhelyeztem az olvasót, sajnos a PHP hibaüzeneteitől omlott össze. A következő hibaüzeneteket adta ki:Ami ennek ellenérő furcsa, hogy a kiegészítő működik - eme hibáját leszámítva - problémamentesen.
Adalékkén bemásolom azokat, amire a hibaüzenetek hivatkoznak.
offset 497-es soroffset 551-es sor12967-es sor13055-ös sor
13121-es sorKöszönöm a segítséget!
■ Hálás lennék a segítségetekért, mert már lassan egy egész napot áldoztam arra, hogy kezdjek valami a hibával, de nem jutottam semmire. Előrebocsátom, hogy nem értek a PHP-hez, de nem is idegenkedek ettől. Remélem, van köztetek olyasvalaki, aki járatos ebben a wikiben (v1.12).
Tehát a probléma: Installáltam a SimpleFeed RSS olvasó kiegészítőt, melyről bővebben itt lehet olvasni. Külön felhívnám a figyelmeteket az itt elérhető simplepie.inc fájlra, melynek még komoly szerepe lesz a későbbiekben.
Annak rendje és módja szerint installáltam a kiegészítőt, de az oldalon, amire elhelyeztem az olvasót, sajnos a PHP hibaüzeneteitől omlott össze. A következő hibaüzeneteket adta ki:
- Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 551 in /home/hardcore/www/jogilexikon/extensions/simplepie.inc on line 12967
- Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 497 in /home/hardcore/www/jogilexikon/extensions/simplepie.inc on line 13055
- Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 497 in /home/hardcore/www/jogilexikon/extensions/simplepie.inc on line 13121
Adalékkén bemásolom azokat, amire a hibaüzenetek hivatkoznak.
offset 497-es sor
- /**
- * @var string Cache location (relative to executing script) /* <span style="font-weight:bold">ez itt a 497-es</span> */
- * @see SimplePie::set_cache_location()
- * @access private
- */
- var $cache_location = './cache';
- /**
- * @var string Class used for parsing feeds
- * @see SimplePie::set_parser_class()
- * @access private
- */
- var $parser_class = 'SimplePie_Parser'; /* <span style="font-weight:bold">ez itt az 551-es</span>*/
- if (preg_match($pcre, $this->remove_rfc2822_comments($date), $match)) /* <span style="font-weight:bold">ez itt a 12967-es sor</span>*/
- {
- /*
- Capturing subpatterns:
- 1: Day name
- 2: Day
- 3: Month
- 4: Year
- 5: Hour
- 6: Minute
- 7: Second
- 8: Timezone ±
- 9: Timezone hours
- 10: Timezone minutes
- 11: Alphabetic timezone
- */
- // Find the month number
- $month = $this->month[strtolower($match[3])];
- // Numeric timezone
- if ($match[8] !== '')
- {
- $timezone = $match[9] * 3600;
- $timezone += $match[10] * 60;
- if ($match[8] === '-')
- {
- $timezone = 0 - $timezone;
- }
- }
- // Character timezone
- elseif (isset($this->timezone[strtoupper($match[11])]))
- {
- $timezone = $this->timezone[strtoupper($match[11])];
- }
- // Assume everything else to be -0000
- else
- {
- $timezone = 0;
- }
- // Deal with 2/3 digit years
- if ($match[4] < 50)
- {
- $match[4] += 2000;
- }
- elseif ($match[4] < 1000)
- {
- $match[4] += 1900;
- }
- // Second is optional, if it is empty set it to zero
- if ($match[7] !== '')
- {
- $second = $match[7];
- }
- else
- {
- $second = 0;
- }
- return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone;
- }
- else
- {
- return false;
- }
- if (preg_match($pcre, $date, $match)) /*<span style="font-weight:bold">13055-ös sor</span>*/
- {
- /*
- Capturing subpatterns:
- 1: Day name
- 2: Day
- 3: Month
- 4: Year
- 5: Hour
- 6: Minute
- 7: Second
- 8: Timezone
- */
- // Month
- $month = $this->month[strtolower($match[3])];
- // Character timezone
- if (isset($this->timezone[strtoupper($match[8])]))
- {
- $timezone = $this->timezone[strtoupper($match[8])];
- }
- // Assume everything else to be -0000
- else
- {
- $timezone = 0;
- }
- // Deal with 2 digit year
- if ($match[4] < 50)
- {
- $match[4] += 2000;
- }
- else
- {
- $match[4] += 1900;
- }
- return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone;
- }
- else
- {
- return false;
- }
- if (preg_match($pcre, $date, $match)) /* <span style="font-weight:bold">ez a szóban forgó sor</span> */
- {
- /*
- Capturing subpatterns:
- 1: Day name
- 2: Month
- 3: Day
- 4: Hour
- 5: Minute
- 6: Second
- 7: Year
- */
- $month = $this->month[strtolower($match[2])];
- return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]);
- }
- else
- {
- return false;
- }
Megoldva