Skip to content
Snippets Groups Projects
Commit cbc89a70 authored by megachriz's avatar megachriz Committed by Chris Leppanen
Browse files

Issue #1953008 by MegaChriz | carn1x: Fixed PHP Fatal error: Nesting level...

Issue #1953008 by MegaChriz | carn1x: Fixed PHP Fatal error:  Nesting level too deep - recursive dependency? in FeedsProcessor.inc on line 199.
parent 56e4fb2b
No related branches found
No related tags found
No related merge requests found
......@@ -252,11 +252,7 @@ abstract class FeedsProcessor extends FeedsPlugin {
catch (Exception $e) {
$state->failed++;
drupal_set_message($e->getMessage(), 'warning');
$message = $e->getMessage();
$message .= '<h3>Original item</h3>';
$message .= '<pre>' . var_export($item, TRUE) . '</pre>';
$message .= '<h3>Entity</h3>';
$message .= '<pre>' . var_export($entity, TRUE) . '</pre>';
$message = $this->createLogMessage($e, $entity, $item);
$source->log('import', $message, array(), WATCHDOG_ERROR);
}
}
......@@ -784,6 +780,30 @@ abstract class FeedsProcessor extends FeedsPlugin {
}
return '';
}
/**
* Creates a log message for when an exception occured during import.
*
* @param Exception $e
* The exception that was throwned during processing the item.
* @param $entity
* The entity object.
* @param $item
* The parser result for this entity.
*
* @return string
* The message to log.
*/
protected function createLogMessage(Exception $e, $entity, $item) {
include_once DRUPAL_ROOT . '/includes/utility.inc';
$message = $e->getMessage();
$message .= '<h3>Original item</h3>';
$message .= '<pre>' . drupal_var_export($item). '</pre>';
$message .= '<h3>Entity</h3>';
$message .= '<pre>' . drupal_var_export($entity) . '</pre>';
return $message;
}
}
class FeedsProcessorBundleNotDefined extends Exception {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment