[TxMt] Re: Undefined index: TM_BUNDLE_SUPPORT

John DeSoi desoi at pgedit.com
Wed Aug 25 19:09:15 UTC 2010


On Aug 25, 2010, at 2:16 PM, David Marr wrote:

> I am trying to use the "reformat document" command in the stock JavaScript bundle. When I run this command I get the following PHP error:
> 
> PHP Notice:  Undefined index: TM_BUNDLE_SUPPORT in /private/tmp/temp_textmate.i7oQrD on line 19

It took me a while to figure this out as well. Depending on the way PHP is compiled, the TM environment variables may be $_ENV or $_SERVER. I had to put this at the top of my script to fix it:

$env = array_key_exists('TM_BUNDLE_SUPPORT', $_SERVER) ? $_SERVER : $_ENV;

And then you have to use $env any place the script would have used $_ENV.

As in my case, it appears you are using a version of PHP that is not part of the OS X standard install. You need to do this if you want to take advantage of XDEBUG and other nice facilities that are not in the standard OS X PHP installation.



John DeSoi, Ph.D.







More information about the textmate mailing list