Opened 11 years ago

Closed 10 years ago

#1464 closed enhancement (duplicate)

PHP's Strict Standards error using the ExtendedFileManager plugin

Reported by: guest Owned by:
Priority: normal Milestone: 0.96
Component: Plugins Version: trunk
Severity: minor Keywords: strict standards static method EFM extendedfilemanager Files


Xinha 0.96 beta2, PHP 5.2.6, FireFox? 3.0.12

First, a topic on the forum about this:

The problem is:
calls to class Files' methods issue a "Strict Standards" error ("non static method Files::xxx should not be called statically"), when you click the editor to add a picture.

My suggestion is:
Replace every "function" in Files.php by "static function". This upgrade naturally depends on the version of PHP used.

The solution koto gave in the topic linked above is:
switch PHP's directive display_errors to Off. The problem is still there but we just don't see it anymore.

The reason of the problem is:
the Files class imported from ImageManager? to ExtendedFileManager? is defined as "Files Utilities" (koto's code comments), therefore a collection of functions, closer to the static class than to a possible object. However, the Files class must have been written seeking the largest compatibility, probably for old PHP versions which did not support "static" to define a function.

I just begin using Xinha (great work!!!), so there might be other classes needing this kind of upgrade...

I hope this post is at the right place and is not redundant ;o)

Have fun!

Change History (1)

comment:1 Changed 10 years ago by gogo

  • Resolution set to duplicate
  • Status changed from new to closed

Won't fix, because adding static will break compat with older PHP. Maybe in the future when PHP 4 can be forgotten (when PHP 6 comes out I will consider), there is another ticket.

Note: See TracTickets for help on using tickets.