This attempts to catch errors that appear before provision_output is called by placing a content marker in front of the serialized string.

This works for me, but needs more love and testing

the provision patch applies to both d5 and head branches.

Comments

anarcat’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed and tested the patch, it seems to work and survive drush's infamous -v.

I have only one small problem with the patch:

+      if (!trim($line)) {
+        $messages[] = array('type' => 'warning', 'message' => $line, 'timestamp' => time());
+      }

Why !trim? For me this reads like:

if line without whitespace is empty:
   add the line as a warning

Seems wrong... What is the use of this line anyways?

anarcat’s picture

Status: Reviewed & tested by the community » Fixed

I committed the patch with that small change (trim() instead of !trim()).

Status: Fixed » Closed (fixed)

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