By fundawang on
I've upgraded my apache2_mod_php to mod_php5. Then, found a critical incompatibility with Drupal file uploading.
I'm the administrator of my site. When I tried to import a PO translation, I only got a message:
strict warning: Creating default object from empty value in /wwwroot/myweb/includes/file.inc on line 147.
Of course, a warning should not affects anything, but translation has not been updated.
Any comments?
Comments
Try changing lines 134 to 143
This is going to happen a lot while using PHP 5 and Drupal. So whenever you encounter this use the same fix. This should be added in the coding standard for preparation to an upgrade to PHP5 for Drupal. The use of automagic instances should be dropped in favor of using real OOP. This is not a PHP5 problem but a reflection of past coding techniques that are deprecated and should be replaced.
use:
$objvar = new stdclass;
or
$objvar = newstdClass();
rather than the automagic of
$objvar->var = 'value';
Use of this should not effect running Drupal on PHP 4.1 or higher. I believe that Drupal requires PHP 4.1.2 or higher in any case.
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com
Thanx.
When I change those lines, it works for serveral times. But now, it won't work again. When I try to import my PO, the page loading just end up without any prompt.
I don't think I've changed anything else.
I am done with HTMLarea
I finally got HTML area to work so now I 'll check out file upload. You might want to follow some of the stuff I am writing because a lot of it helps with other problems.
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com