php_error_docref() (Was: gd on OSX)

From: Date: Mon, 12 Aug 2002 20:18:54 +0000
Subject: php_error_docref() (Was: gd on OSX)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-86745@lists.php.net to get a copy of this message
At 18:44 12.08.2002, you wrote:
[snip] I guess I should start updating ODBC to be using the php_error_docref() as well... I'll wait for your commit for samples ;) Dan
Here is a script that converts unified php_error() calls to php_error_docref() calls with docref parameter set NULL automatically. All you have to do is look for non unified messages and insert a special docref value where needed. Also you can make use of php_error_docref1/2 and expand calls to show one or two important parameters (look for php_error_docref<n> in commit on exif.c). marcus #!/bin/sh for i in find -name '*.c' do
    echo ${i}
    cat ${i} | sed "s/\(php_error(\)\([^\"]*\"\)\(%s()\: \)\(.*\)\(, get_active_function_name(TSRMLS_C)\)/php_error_docref( NULL TSRMLS_CC, \2\4/g" >> $i.docref && cp -f $i.docref $i
done

« previous php.dev (#86745) next »