Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » How to get rid of warnings in console?
How to get rid of warnings in console? [message #72448] Wed, 04 June 2008 07:22 Go to next message
Klaus Kaal is currently offline Klaus KaalFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

I am developing components for Joomla! 1.5. Joomla! uses singleton
patterns extensively. That means that the objects have a static field in
which it stores a instance of itself. A getInstace() function makes this
own instance awailable globally.

PDT throws a warning for every occurance of this construct: "Debug
strict... - Non-static method JLoader::register() should not be called
statically"

For my development work it is really not of interest if that is a problem
or not (I think it is a quite modern design), but it is virtually
impossible to find my relevant debugging info in tons of (for me)
unnecessary info.

Can anybody tell me how to switch that off?

Thank you very much
Klaus
Re: How to get rid of warnings in console? [message #72483 is a reply to message #72448] Wed, 04 June 2008 10:18 Go to previous messageGo to next message
Michael Spector is currently offline Michael SpectorFriend
Messages: 110
Registered: July 2009
Senior Member

I've just opened an issue request about that:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235559

For now, I can suggest you to use error_reporting(E_ERROR) somewhere in
the beginning of your code, so you will be notified only on real errors.

Thanks!

kkaal wrote:
> Hi,
>
> I am developing components for Joomla! 1.5. Joomla! uses singleton
> patterns extensively. That means that the objects have a static field in
> which it stores a instance of itself. A getInstace() function makes this
> own instance awailable globally.
>
> PDT throws a warning for every occurance of this construct: "Debug
> strict... - Non-static method JLoader::register() should not be called
> statically"
>
> For my development work it is really not of interest if that is a
> problem or not (I think it is a quite modern design), but it is
> virtually impossible to find my relevant debugging info in tons of (for
> me) unnecessary info.
>
> Can anybody tell me how to switch that off?
>
> Thank you very much
> Klaus
>
Re: How to get rid of warnings in console? [message #72921 is a reply to message #72448] Wed, 11 June 2008 17:31 Go to previous message
Michael Fesser is currently offline Michael FesserFriend
Messages: 16
Registered: July 2009
Junior Member
..oO(kkaal)

>I am developing components for Joomla! 1.5. Joomla! uses singleton
>patterns extensively. That means that the objects have a static field in
>which it stores a instance of itself. A getInstace() function makes this
>own instance awailable globally.
>
>PDT throws a warning for every occurance of this construct: "Debug
>strict... - Non-static method JLoader::register() should not be called
>statically"
>
>For my development work it is really not of interest if that is a problem
>or not (I think it is a quite modern design),

It is bad design, in strict PHP mode I would even call it a bug. Static
methods should be marked as that.

But in case of Joomla! 1.5 a reason might be that it's still backwards-
compatible with PHP 4 (AFAIK, I don't use it).

>but it is virtually
>impossible to find my relevant debugging info in tons of (for me)
>unnecessary info.
>
>Can anybody tell me how to switch that off?

You could disable E_STRICT errors by changing error_reporting.

Micha
Re: How to get rid of warnings in console? [message #72939 is a reply to message #72483] Wed, 11 June 2008 17:31 Go to previous message
Michael Fesser is currently offline Michael FesserFriend
Messages: 16
Registered: July 2009
Junior Member
..oO(Michael Spector)

>I've just opened an issue request about that:
>https://bugs.eclipse.org/bugs/show_bug.cgi?id=235559
>
>For now, I can suggest you to use error_reporting(E_ERROR) somewhere in
>the beginning of your code, so you will be notified only on real errors.

Bad idea. This would also suppress E_NOTICE errors, which are most
important while developing.

Micha
Previous Topic:utf-8
Next Topic:PDT and XDebug 2.0.3
Goto Forum:
  


Current Time: Mon Jan 30 12:39:22 GMT 2023

Powered by FUDForum. Page generated in 0.04488 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top