Skip to content

Passing undefined variables #4

@g33kgrrl

Description

@g33kgrrl

For issues like the following:

PHP Notice:  Undefined index: data in /var/www/php/maps_feed.php on line 27, referer: http://localhost/

I've been setting the PHP to assume a value of 'null' if the variables in question are passed undefined, but I suspect it may be best practice to fix that in the JavaScript that calls it. I see the maps_feed.php call at line 72 in js/tidepoolsframeworks/map_rendering.js , for example, but I don't know the jQuery syntax for initializing 'data' to 'null' if it doesn't get any results when it looks for :maps. Thoughts?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions