Closed (fixed)
Project:
Drupal for Facebook
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
8 Feb 2011 at 04:44 UTC
Updated:
31 Jul 2012 at 02:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
Dave Cohen commentedThanks for the report. That happens from time to time because I rely on dpm() when developing. Just sloppy that I checked it in. It's safe to delete that line in your local copy.
Comment #2
Magos commentedThis is happening with the current 6.x-3.2-rc3 version.
Line 838 has:
dpm(__FUNCTION__);
Changing that line to check for the function, as is done elsewhere, will fix the issue:
if (function_exists('dpm')) dpm(__FUNCTION__);
Comment #3
xurizaemonPatch removes several other instances where dpm() is used through the normal 7.x-3.x codebase, but doesn't touch the fb_devel or fb_test modules.
Wrapping with function_exists() is good sense (at least it prevents fatals), but may expose sensitive data on sites deploying the module.
Better to leave dpm() commented out.
Comment #4
Dave Cohen commentedI've been pushing a whole bunch of overdue patches that were made to D6 into the D7 branch. In the process, I've cleaned out a bunch of calls to dpm(). So marking fixed.
For the record, anytime I commit a call to dpm() (outside fb_devel.module, or in a few cases wrapped in
if (function_exists('dpm'))..., it is an accident. I rely on dpm() when debugging, probably too much (my satisfaction level with xdebug is mixed at best). When I commit a bug fix, I often accidentally commit some dpm calls, too. When I make this sloppy error, please feel free to submit a bug report like this, and you should be able to simply delete that line as a workaround until the next push.I am sorry for the inconvenience.
Comment #5
xurizaemonNo stress whatsoever. I do it too, and running across this inspired me to start writing a good blog post on checking for debug statements in my own code. I'll link to it when I finish it (currently boggling at the number of git pre-commit solutions available on d.o).