Why dummy callback used in ob_start?

Notice: This thread is very old.
Slava.Aurim
Member | 19
+
0
-

I'm learning Nette source and often see such code:
ob_start(function () {}) (for example, in Latte\Runtime\Template::capture() )

Why this dummy callback used for ob_start? What problem this solves? Why not ob_start(null)?

David Grudl
Nette Core | 8082
+
0
-
Slava.Aurim
Member | 19
+
0
-

@DavidGrudl, thank you very much – for this safety tip! Unfortunately, this information is not available in the php documentation or it comments. And I checked it – indeed, such an approach prevents the printing of messages about php errors.