Closed (duplicate)
Project:
Drupal core
Component:
theme system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
5 Oct 2004 at 10:01 UTC
Updated:
9 Feb 2005 at 23:56 UTC
strict warning: var: Deprecated. Please use the public/private/protected modifiers in c:\www\drupal-cvs\themes\engines\xtemplate\xtemplate.inc on line 42.
in a part of php.ini I've got this:
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
Comments
Comment #1
marcelloh commentedIt's my point and I've got to add that I'm using PHP 5.02 under Windows XP SP2
Perhaps that helps a little bit.
BTW: The status isn't fixed, because it isn't fixed.
The status should be open, or something....?
Comment #2
(not verified) commentedI have this proble in my win2003 sever. But It's OK in my local windows XP.
how to resolve it ?:
strict warning: var: Deprecated. Please use the public/private/protected modifiers in D:\ee\web\php\drupal\themes\engines\xtemplate\xtemplate.inc on line 42.
strict warning: var: Deprecated. Please use the public/private/protected modifiers in D:\ee\web\php\drupal\themes\engines\xtemplate\xtemplate.inc on line 43.
strict warning: var: Deprecated. Please use the public/private/protected modifiers in D:\ee\web\php\drupal\themes\engines\xtemplate\xtemplate.inc on line 44.
strict warning: var: Deprecated. Please use the public/private/protected modifiers in D:\ee\web\php\drupal\themes\engines\xtemplate\xtemplate.inc on line 45.
.....
Comment #3
narres commentedI have changed to:
private $filecontents=""; /* raw contents of template file */
private $blocks=array(); /* unparsed blocks */
private $pars...
from:
var $filecontents=""; /* raw contents of template file */
var $blocks=array(); /* unparsed blocks */
var $pars...
in themes/engines/xtemplate/xtemplate.inc
Comment #4
narres commentedI have changed to:
private $filecontents=""; /* raw contents of template file */
private $blocks=array(); /* unparsed blocks */
private $pars...
from:
var $filecontents=""; /* raw contents of template file */
var $blocks=array(); /* unparsed blocks */
var $pars...
in themes/engines/xtemplate/xtemplate.inc
Comment #5
TDobes commentedThe fixes you suggest do work for PHP 5, but they completely break xtemplate for PHP 4 users.
The short-term solution is to turn off these strict error messages. (See this issue.) A long-term solution is being discussed in the Make Drupal PHP 5 Compliant task... This suggestion looks particularly promising.
Marking this as a duplicate.
Comment #6
(not verified) commentedit works to change var by private like narras said..
Dont know why but worked fine..
thanks
Comment #7
TDobes commentedFYI: The reason we do not simply follow narres' suggestion, which fixes this problem for PHP5, is that changing var to private breaks the xtemplate engine for PHP4. We'd like to maintain backwards compatibility with PHP4, which still is used on many (probably most) shared hosts.