How to ignore @ errors in a custom PHP error handler

In my PHP pages, I’m using a custom error handler, to make potential errors a bit more user-friendly. However, in some very particular cases, I don’t want an error to be raised (e.g. I’m logging all errors to a server file, but if writing to that file does not work for whatever reason, I don’t want to bother the user with it). In those cases, I’m using the @ error-control operator to ignore any error:
@error_log($error_trace.' ['.str_replace("\n",'\n',$error_message).'] ['.str_replace("\n",'\n',$error_data)."]\n",3,ERROR_LOG);

The @ error-control operator, However, even with @, the custom error handler is still triggered.

Thanks to this blog post I learned that error_reporting is 0 if the statement that caused the error was prepended by the @ error-control operator. So the solution is to add:
if (error_reporting() === 0) {
// continue script execution, skipping standard PHP error handler  (e.g.when using @ in front of an expression)
return true;
}

to the custom error handler

Share

Update to removing annoying context menu items

Time for an update of the various things you need to do to remove annoying context menu items:

3D Print with 3D Builder context

  • regedit: remove subkeys
    HKEY_CLASSES_ROOT\SystemFileAssociations\.bmp\Shell\T3DPrint
    HKEY_CLASSES_ROOT\SystemFileAssociations\.jpg\Shell\T3DPrint
    HKEY_CLASSES_ROOT\SystemFileAssociations\.png\Shell\T3DPrint

Edit with Photos

  • regedit: add
    HKEY_CLASSES_ROOT\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc\Shell\ShellEdit > New String Value = ProgrammaticAccessOnly

Cast to Device (*)

  • regedit: add
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked > New String Value = {7AD84985-87B4-4a16-BE58-8B72A5B390F7}

Share

  • regedit: remove subkeys from
    HKEY_Classes_ROOT\*\shellex\ContextMenuHandlers\ and
    HKEY_CLASSES_ROOT\Directory\shellex and
    HKEY_CLASSES_ROOT\Folder\shellex
    • Adobe.Acrobat.ContextMenu
    • DropboxExt
    • Modern Sharing
    • PicaViewCtxMenuShlExt
    • Sharing
    • SnagItMainShellExt
    • TeraCopy
Share

Change text size in Notes pane of PowerPoint

In one of my PowerPoint slide decks, the Notes pane at the bottom in the Normal View showed the presenter notes in a very large font. When looking at the font size however, nothing seems to be wrong: it was 10.5 points, which seems to be the default.

It took quite some googl’ing until I finally figured out that somehow the Zoom factor of the Notes text was changed.

To reset it to the default size:

  1. Click in the Notes pane
  2. In the Ribbon, in the View tab, click Zoom
  3. Set to 100%
  4. Click OK.

You can also change the size of the Notes pane text  by holding the CTRL key and use the scroll wheel of your mouse, while hovering over the Notes pane.

Share