I have a large, multi-contextual site - about 60 contexts. I've been using phpThumbOf to handle my image resizing needs which has worked fine until recently (all of the contexts until recently have used the same domain). In trying to get phpThumbOf to work with the new domain, I ran across a number of issues and found in the log that it was using an incorrect document root.
So, seeing that there is a phpthumb_document_root setting, I attempted to set it correctly for my new context. However, it didn't actually change the behavior for phpThumbOf - it still tried to pull the same document root that it had done before.
After some digging I found this line in phpthumbof.class.php:
$this->phpThumb->setParameter('config_document_root',$this->modx->context->getOption('base_path',MODX_BASE_PATH,$this->config));
I edited this line as follows:
$this->phpThumb->setParameter('config_document_root',$this->modx->context->getOption('phpthumb_document_root',MODX_BASE_PATH,$this->config));
Now phpThumbOf is behaving perfectly well. Wouldn't it make more sense to have phpThumbOf look for a setting key of 'phpthumb_document_root' to match what already exists in system settings? Is there any particular reason why it's looking for base_path?