Strict Standards?
Moderator: General Moderators
Strict Standards?
What are these new "Strict Standards" and why are they breaking all kinds of code?
I am using the newest version of phpMyAdmin on a linux pc running php version 5.0.4 and I keep getting errors such as:
This is the second application that doesn't want to work very well under this version of php.Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /mnt/storage/server/www/html/complete/database/libraries/storage_engines.lib.php on line 108
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
PHP 5 introduced access restrictions to class variables. The keyword "var" doesn't exist in strict (meaning strict compliance mode). "var" is from PHP 4. Most scripts you will find in the wild right now are still written for PHP 4 in mind. They can not be completely compliant with 5 while maintaining PHP 4 support without different codebases for their objects, among other variances.
Since the code was written for 4, switching all the instances of "var" in that context to "public" will fix it, generally.
Since the code was written for 4, switching all the instances of "var" in that context to "public" will fix it, generally.
Keep in mind that the PHP group realized just how harsh of a switch this was, and in PHP6, it will not give that notice.agtlewis wrote:I am using the newest version of phpMyAdmin on a linux pc running php version 5.0.4 and I keep getting errors such as:
This is the second application that doesn't want to work very well under this version of php.Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /mnt/storage/server/www/html/complete/database/libraries/storage_engines.lib.php on line 108
It is an E_STRICT notice, not an error or warning.
Keep in mind that public/private don't work in php4, so switching it 'fixes' it for php5, but makes the script not run on php4.feyd wrote:Since the code was written for 4, switching all the instances of "var" in that context to "public" will fix it, generally
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US