I do not have devel module installed, and fb_permission does not claim to depend on it. Thus, line 30 throws an exception about call to undefined function dpm().

CommentFileSizeAuthor
#3 fb-1054494-dpm.patch2.63 KBxurizaemon

Comments

Dave Cohen’s picture

Assigned: Unassigned » Dave Cohen

Thanks 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.

Magos’s picture

This 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__);

xurizaemon’s picture

Title: fb_permission module calling dpm() » Remove several dpm() calls throughout
Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new2.63 KB

Patch 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.

Dave Cohen’s picture

Status: Needs review » Fixed

I'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.

xurizaemon’s picture

No 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).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.