All Questions

839
votes
23answers
1235289 views

PHP: "Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset"

I am running a PHP script, and keep getting errors like: Notice: Undefined variable: my_variable_name in C:\wamp\www\mypath\index.php on line 10 Notice: Undefined index: my_index C:\wamp\www\...
838
votes
30answers
143574 views

Reference - What does this error mean in PHP?

What is this? This is a number of answers about warnings, errors and notices you might encounter while programming PHP and have no clue how to fix. This is also a Community Wiki, so everyone is invit...
257
votes
5answers
625604 views

Showing all errors and warnings

UPDATE 2: I have now removed the following from the .php file: <?php error_reporting( E_ALL ); ?> I have set display_erros in php.ini as follows: display_errors = On error reporting is...
1062
votes
17answers
134385 views

Virtual member call in a constructor

I'm getting a warning from ReSharper about a call to a virtual member from my objects constructor. Why would this be something not to do?
188
votes
7answers
248910 views

What causes javac to issue the "uses unchecked or unsafe operations" warning

For example: javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
127
votes
11answers
445739 views

Illegal string offset Warning PHP

I get a strange PHP error after updating my php version to 5.4.0-3. I have this array: Array ( [host] => 127.0.0.1 [port] => 11211 ) When I try to access it like this I get strange w...
463
votes
24answers
329855 views

How do I address unchecked cast warnings?

Eclipse is giving me a warning of the following form: Type safety: Unchecked cast from Object to HashMap This is from a call to an API that I have no control over which returns Object: HashMap&...
48
votes
2answers
12459 views

Why is it bad to use an iteration variable in a lambda expression

I was just writing some quick code and noticed this complier error Using the iteration variable in a lambda expression may have unexpected results. Instead, create a local variable within the l...
79
votes
3answers
48186 views

Selectively disable GCC warnings for only part of a translation unit?

What's the closest GCC equivalent to this MSVC preprocessor code? #pragma warning( push ) // Save the current warning state. #pragma warning( disable : 4723 ) // C4723: po...
84
votes
3answers
55842 views

iPhone OS Memory Warnings. What Do The Different Levels Mean?

Regarding the black art of managing memory on iPhone OS devices: what do the different levels of memory warning mean. Level 1? Level 2? Does the dial go to 11? Context: After an extensive memory stre...

Previous Next