Questions tagged [notice]

289 questions
27
votes
3 answers

Notice: Trying to get property of non-object error

i am trying to get data from: http://api.convoytrucking.net/api.php?api_key=public&show=player&player_name=Mick_Gibson but if i want to get player_name variable with this code:
Aleš Kalan
  • 337
  • 1
  • 3
  • 11
20
votes
4 answers

Is it alright to suppress/hide PHP notices?

I've suppressed notices for quite some time with no problems whatsoever but I am beginning to wonder if I'm doing the right thing. I can't seem to find any logical reason why I shouldn't just suppress them but some other people seem to think that…
animuson
  • 50,765
  • 27
  • 132
  • 142
16
votes
4 answers

Check if Variable exists and === true

I want to check if: a field in the array isset the field === true Is it possible to check this with one if statement? Checking if === would do the trick but a PHP notice is thrown. Do I really have to check if the field is set and then if it is…
Sebastian Sebald
  • 12,495
  • 5
  • 55
  • 63
9
votes
6 answers

PHP How to fix Notice: Undefined variable:

code: Function ShowDataPatient($idURL) { $query =" select * from cmu_list_insurance,cmu_home,cmu_patient where cmu_home.home_id = (select home_id from cmu_patient where patient_hn like '%$idURL%') AND cmu_patient.patient_hn…
Beebrabie
  • 111
  • 1
  • 1
  • 6
6
votes
3 answers

Array 2 string conversion while using CURLOPT_POSTFIELDS

I have following code: // $postfields = array(); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); My $postfields variable is an array of parameters. And i have a notice there is array to string conversion. It works tho. I could use…
Grzegorz
  • 3,174
  • 4
  • 24
  • 39
6
votes
3 answers

How can I pre-increment at an empty array index without throwing a notice?

I'd like to do this: $matched_tags[$tag]++ As a simple way of keeping track of how many times a given $tag is found during a loop. This appears to be throwing a NOTICE the first time any new $tag is encountered, because the index is undefined. PHP…
Tom Auger
  • 18,326
  • 22
  • 73
  • 100
5
votes
4 answers

php: "notice" warnings on different machine

i've set up all my php stuff on a new machine and i'm getting really lots of notices warnings. my code is working properly without errors on my old machine. eg. the following line (which should get a recordset value) will cause a notice: $ID =…
Fuxi
  • 7,382
  • 24
  • 88
  • 135
5
votes
1 answer

Change wc_empty_cart_message function in WooCommerce 3.1

I've been trying to change my layout for the empty-cart message. I've removed the action, and try to replace it. I'd like to change the htm structure output from:

to:
Onno V.
  • 97
  • 1
  • 12
5
votes
3 answers

Do all Wordpress sites need a EU Cookie notice?

Does Wordpress in its default install need an EU cookie notice? I have a number of people who have very simple Wordpress sites and am not sure if even a simple Wordpress site installs cookies on a viewers computer?
barbeluk1
  • 99
  • 6
5
votes
2 answers

How to prevent Symfony from quitting the whole program when getting a warning or notice

In Symfony, when we run a command, if there is any notice or warning, Symfony shows a big red message and quits the whole program. I want an error to be emitted to the log, but I don't want the whole program to quit. Can anyone please tell me how to…
user3541554
  • 107
  • 6
5
votes
2 answers

I18n for flash messages with parameters in Rails

How can I add parameters to my parametrized and internationalized error message? Say, in my controller there's: flash[:error] = t(:error)[:my_error_message] And in en.yml: error: my_error_message: "This is the problem XXX already."
valk
  • 7,994
  • 11
  • 50
  • 73
5
votes
2 answers

flash[:notice] not working when using AJAX in Rails

I've tried different variants of make flash[:notice] working without reload. Stackoverflow gave me this - How do you handle Rail's flash with Ajax requests?, but I can't find solution, that worked for me. For example, added to my controller: def…
deny7ko
  • 2,315
  • 8
  • 37
  • 69
4
votes
2 answers

Is there a way to have Behat NOT fail on PHP Notice errors?

I understand that it is a best practice to have all variables defined and to check for array indexes before evaluating. However, I'm trying to run some tests on new functionalities developed on top of some legacy code which has not been coded this…
JuanXarg
  • 408
  • 2
  • 10
4
votes
2 answers

How to write a test case using rspec for a notice message

In my application I have a topic controller and I need to write a test case for creating a new topic. when a new topic is created it will be redirected to the show page of the newly created topic and a notice will be displayed "Topic was created…
Praveen R
  • 160
  • 11
4
votes
1 answer

PostgreSQL: Capture RAISE NOTICE from a client connection via ZeosLib/Lazarus

I have developed a client application that use PostgreSQL 8.4 RDBMS. My Application is written in Lazarus and ZeosLib 7.2 for database access. I use a lot of stored procedures and in specific point I use raise notice to get info of the procedure…
AndreaBoc
  • 2,471
  • 2
  • 13
  • 20
1
2 3
19 20