Schonhose

Home | PP Addons| Gallery | Photoblog

constants vs. variables

May 21, 2007
php.png

I just spend more than an hour tracking down why certain admin addons were not working in my photoblog anymore. Finally I found it: Pixelpost defines $dir = “../addons” and uses that to suck in the user defined functions from the addon PHP files.

However, this one file (ow dear, sounds exciting doesn’t it) included a function with a different declaration for $dir. So, after inclusion $dir changed and the suck-in script was left bewildered.

It started looking at the new folder and guess what? It couldn’t find any addons to include. Due to the missing addon functions, I was unable to upload a photo and got very frustrated about this last evening. :( Today I methodologically tracked down the issue and resolved it for now. :D

And this, ladies and gents, should be a wise lesson why we should use constants instead of variables in PHP. :D

Categories
Programming
Tags
PHP

« Comedy Central I still cry »

Navigation

  • Miscellaneous
  • Photography
  • Programming
  • Website

Countdown:

    No dates present

Tagcloud

3g addon allergic rhinitis backup basketball battery replacement Bob Marley budweiser bug Defensio design ebay exposition googlemaps HDR King layout update Lightroom Miscellaneous music paypal personal photoblog Photography Photoshop PHP Pixelpost pollens preview quote rant Touch UNC update videoclip vote Website Wordpress youtube

Flickr: latest uploads

Broeltorens, KortrijkNarcissus50 point dart140!StadskanaalEuroStaete building by nightThe end of summerFishermen memorial at KatwijkBranch in the sandFir cones
 

Paypal Donations

Why donate? Any donation will be considered a motivation to continue providing support and writing more plugins.

Please remember: it is not the amount but the thought that counts!
Amount: $

Twitter:

No public Twitter messages.

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox