About a week ago, my drupal 6.14 site began reporting the following error:

recoverable fatal error: Object of class stdClass could not be converted to string in /home/.sites/79/site238/web/includes/bootstrap.inc on line 774.
warning: preg_match() expects parameter 2 to be string, object given in /home/.sites/79/site238/web/includes/bootstrap.inc on line 777.

Does anybody have any idea what this means? It doesn't seem to be causing me any problems, but it's kind of worrisome.

About the same time that this error started appearing, I was trying to solve this little problem as shown by the status report,
and asked my hosting service if they could sort it out:

Upload progress Not enabled
Your server is capable of displaying file upload progress through APC, but it is not enabled. Add apc.rfc1867 = 1 to your php.ini configuration. Alternatively, it is recommended to use PECL uploadprogress, which supports more than one simultaneous upload.

They haven't been able to solve that, but perhaps in trying they managed to break something else? Are they connected?

Any help would be much appreciated.

Comments

marcvangend’s picture

I'm 99.9% sure that those two are not related.

On those lines in bootstrap.inc is the drupal_validate_utf8() function. The error means that an object is given to that function while it expects a string. For instance, it occurs when you do this:

$node = node_load(1); // $node is now a node object
drupal_validate_utf8($node);

Check if you're doing something like that in your code. Also look for check_plain() and filter_xss(), because those functions make use of drupal_validate_utf8().

The Upload progress message is a recommendation, not an error. If you can enable some features on your server, Drupal will benefit from it.

saltspringer’s picture

Thanks for replying marcvangend, but I haven't changed anything in the code. I'm not knowledgeable enough to go in and hack code, so I leave it alone.

The installation's only a couple of weeks old, and the problem appeared about a week ago. From the outset, I had some errors related to file permissions - errors that I hadn't seen on my MAMP development server version of the site. The problems seemed to be related to file ownership, and with the help of the people from the hosting service, I managed to get them solved, only to see this appear a couple of days later.

Good news! Not sure why, but the problem has disappeared! I just went to check it again, and it's gone - as recently as a couple of hours ago it was still there.

Weird, but I guess good...

marcvangend’s picture

Brian, I didn't mean to suggest that you hacked core, check_plain() and similar functions are also often used in custom themes and modules, or php blocks for instance. Of course it's also possible that you encountered a bug in core or contrib that only occurs under specific circumstances - circumstances that obviously are no longer there. Anyway, it's good to see that the error is gone. Let's hope that is doesn't come back.