Not all of us have a perfect encyclopedic knowledge of the internals. It would certainly help me (and probably others) to know which files these code blocks come from.
All I can tell you at the moment is that $selected_tourstyles
is probably an empty array if it is an array at all.
To debug look for where $_GET['tourstyles']
is coming from. Probably a link or a form. It could be that the link or form is not getting the data to put into the query string.
You could try wrapping:
write_log('selected_original_tours: ' . $selected_tourstyles[0]);
with:
if(count($selected_tourstyles)>0){
write_log('selected_original_tours: ' . $selected_tourstyles[0]);
}
This will only run that line if the array has something in it. I have no earthly idea if that will be good for the overall design of whatever this code does.
Related Posts:
- PHP Deprecated: Non-static method should not be called statically
- Plugin.php: PHP Notice: Undefined offset: 0 in
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- Unable to activate wordpress importer after installing it
- WordPress shows error related to allow_url_fopen
- UTF-32be error WordPress
- Why does this code snippet create a critical error on my site? [closed]
- Trying to get property of non-object wordpress error message
- Replace old theme that understand old css (vcex_icon_box css_animation)
- Open_basedir errors – But setting basedir to none redults in 502 Bad Gateway
- WordPress fatal error from php protocol codes
- Changing wordpress/woocommerce notices default message to other languages (text)
- PHP Error message Upload images to remote server
- I can’t view the orders on the woocomerce dashboard with the brainblocks plugin
- Modifying server’s response to API endpoint
- Plugin debugging with errors in activation routine
- What are the best practices for updating?
- Consuming an external API in WordPress?
- How can I import a class privately into a plugin?
- How to Loop Plugin Option Field Set?
- How can I execute some small piece of PHP code in a sandbox area of my WP?
- How to Create a Directory in a Plugin Folder?
- Activating a single plugin via php
- Create plugin that works in background
- Checking for user role in a custom plugin
- An Unexpected HTTP Error occurred during the API request
- HELP: Integrating WP with raw PHP code once published button is hit
- How to redirect Old Post URL to new Post and keep Old post Comments?
- How to add pagination to wpbakery grid?
- jQuery function didn’t work in my plugin
- bulk change of image setting “link to” to “link to: image url “
- Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response
- How to get number of Affected rows from wordpress dbDelta() function
- Sending email from inside a plugin using PHP PEAR
- Images not showing after changing wp-content folder name
- Adding an Options Page to a Plugin
- How do I “get the next 10 posts after post_id == x”?
- Error with Image Slide plug-in/ s3slider in WP
- Changing “elapsed time” to “time remaining” on MP3-jPlayer audio player with CSS or PHP changes
- Customizing NEXTGEN Gallery To link images to pages
- WooCommerce specifc variations for specific user role [closed]
- Nested shortcode functions accessing variable
- Deactivating all plugins and reactivating one by one, fixes conflicts. Why?
- Ability to automatically redirect a URL
- Passing Page ID used in Meta Box Creation to JavaScript
- Activate my plugins via FTP
- How to add apply_filter for a class property in plugin
- Warning: Use of undefined constant list_all – assumed ‘list_all’ (this will throw an Error in a future version of PHP)
- A server-side hook failed when committing plugin code to SVN
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- Need to replace Currency Shortforms
- Api external with wordpress
- How to delete all categories programatically?
- How to use custom Javascript code inside a plugin?
- How to use printf to output two links?
- File Uploader – Upload without adding to Media Library
- Building a plugin into a theme
- 2 wordpress site same database
- How to redirect to a page after the form is submitted
- Trying to include files in plugin isn’t working
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- implement custom roles in custom plugin
- How to get current cart values using WC_Shortcodes?
- How to authorize viewing and clicking a function only logged users?
- WordPress is redirecting me to homepage
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Cant create table on plugin activation
- Creating an array from form inputs before it is posted to the options database
- WP search box on page not finding .PDF files
- Plugin which unlock free gift when you reach some amount in cart
- Problem with Date translation in WordPress
- How to assign a specific service to a specific provider based on location
- How can I create a secure file download in WordPress?
- 500 Internal server error wp_handle_upload_prefilter
- Can’t access 3rd party API, code works on local server but not on wordpress
- ERROR message: “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”
- Object of class WP_Error could not be converted to string in /formatting.php
- Cannot modify header information – headers already sent during plugin activation
- Ajax call to php function doesn’t work PHP code
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Nested DIV’s across functions in PHP, do not seem to work
- How to insert image into the Settings Page of a Plugin?
- Paginated Comments “reply” does not work!
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- get_option return incorrect values
- I created a custom form in HTML/CSS and now I need it to submit … should I create custom PHP or is there a plugin I can use?
- AJAX doesn’t pass variables to the php function in the plugin
- Restore Category Base
- How to add a handler for a button in plugin?
- private functions in plugins
- Move related products after product summary? [closed]
- Is there a visual editor specifically for page snippets/sections?
- Visual Composer Data Source?
- Woocommerce disable checkout on specific day
- TML Theme My Login Plugin
- How to debug periodic performance issue
- Posts in Admin only display 1 Post instead of all Post in admin area
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Oxygen plugin wordpress stuck in loading sequence forever when trying to edit a page [closed]
- plugin doesn’t retrieve data from database