plugin_api.inc.php on line 1625

Found a bug? Tell us!!
chrittig
Regular
Posts: 12
Joined: Sat Sep 12, 2009 9:54 pm

plugin_api.inc.php on line 1625

Post by chrittig »

Hi there!

After Update on s9y 1.7.2 and PHP 5.4.9 i got an error while searching in the blog:

= SERENDIPITY ERROR ==

Please correct:

Illegal string offset 'properties' in /path/to/directory/serendipity/include/plugin_api.inc.php on line 1625

It is here:

// Get a reference to a content field (body/extended) of
// $entries input data. This is a unifying function because
// several plugins are using similar fields.

if (is_array($eventData) && isset($eventData[0]) && is_array($eventData[0]['properties'])) {
if (!empty($eventData[0]['properties']['ep_cache_' . $fieldname])) {


Sorry I am not able to correct this...

Greetings
Christian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

Thanks for noting!

I really wonder why it errors here, in the eventData if.
It would better do on the next line, whyever.
As this is strange, could you please give me the url to take some search tests on my own, please.
Which ep_ property field do you have in that/these entries?

Else it would be nice to have a more detailled error, so you could turn OFF the production mode true, by temporary adding

Code: Select all

    $serendipity['production'] = false;
to the manual adding part (~@end) of your serendipity_config_local.inc.php file, to see the trace path of that error, or some better hint what be might be the real issue.

We will find a solution for this.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Re: plugin_api.inc.php on line 1625

Post by mattsches »

Timbalu wrote:I really wonder why it errors here, in the eventData if.
It's because the key 'property' doesn't exist here, that's why PHP issues a warning here.

Maybe $eventData[0] is a string?
As of PHP 5.4, string offsets should be an integer or an integer like string, otherwise the result will be a warning.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

Shouldn't we all get the error then, mattsches? Mine do work.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
onli
Regular
Posts: 2828
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: plugin_api.inc.php on line 1625

Post by onli »

It depends on which plugin is calling the event. Maybe you don't have it installed.

Please add

Code: Select all

&& is_array($eventData[0])
after

Code: Select all

isset($eventData[0])
If the site then seems stable (there is no appearant underlying error) we will patch that in the core. Do you know where to do that?
Regards
chrittig
Regular
Posts: 12
Joined: Sat Sep 12, 2009 9:54 pm

Re: plugin_api.inc.php on line 1625

Post by chrittig »

Thank you for your answers.

I added the following to

Code: Select all

  $serendipity['production'] = false;  
to the serendipity_config_local.inc.php file.

If i Search now, i got this error

Code: Select all

== TESTING ERROR MODE ==



Fatal error:  Uncaught exception 'ErrorException' with message 'Illegal string offset 'properties'' in /kunden/146812_52351/webseiten/serendipity/include/compat.inc.php:131
Stack trace:
#0 /kunden/146812_52351/webseiten/serendipity/include/plugin_api.inc.php(1625): errorToExceptionHandler(2, 'Illegal string ...', '/kunden/146812_...', 1625, Array)
#1 /kunden/146812_52351/webseiten/serendipity/plugins/serendipity_event_wikilinks/serendipity_event_wikilinks.php(231): serendipity_event->getFieldReference('body', Array)
#2 /kunden/146812_52351/webseiten/serendipity/include/plugin_api.inc.php(1073): serendipity_event_wikilinks->event_hook('frontend_displa...', Object(serendipity_property_bag), Array, Array)
#3 /kunden/146812_52351/webseiten/serendipity/include/functions_entries.inc.php(1120): serendipity_plugin_api::hook_event('frontend_displa...', Array, Array)
#4 /kunden/146812_52351/webseiten/serendipity/include/genpage.inc.php(106): serendipity_printEntries(Array)
#5 /kunden/146812_52351/webseiten/serendipity/index.php(614) in /kunden/146812_52351/webseiten/serendipity/include/compat.inc.php on line 131
The Url: www.nebelreiter.com
testing mode is deactivated again.. I can activate it tomorrow again

Greetings Christian
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

I'd like to help, but I cannot reproduce the error on your site. Which keyword did you search for?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
chrittig
Regular
Posts: 12
Joined: Sat Sep 12, 2009 9:54 pm

Re: plugin_api.inc.php on line 1625

Post by chrittig »

You are right.

I can't believe it, i cannot reproduce it,too.

Until my last Posting it was reproducable... now its very awkward for me...

So, the thread could be closed...
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

Funny, and you did not do anything since then? Install or (re)/move Plugins, write entries or something?
Or maybe the PHP version was upgraded silently?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
chrittig
Regular
Posts: 12
Joined: Sat Sep 12, 2009 9:54 pm

Re: plugin_api.inc.php on line 1625

Post by chrittig »

It seems to be a browser Problem.

I just have this Problem with Chrome/chromium. IE and Firefox are ok...
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

So that seems to be a strange Browsers sending POST request, since the error you get is the Servers response.
Someone wants to investigate this?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: plugin_api.inc.php on line 1625

Post by schimanke »

I get this error too when I search on my blog with s9y 1.7.3 and Firefox 23.0.1. Any ideas how to fix it?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

I can not reproduce this, using FF 24.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: plugin_api.inc.php on line 1625

Post by schimanke »

I can confirm.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: plugin_api.inc.php on line 1625

Post by Timbalu »

Which Searchterm?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply