From drupal-cvs@drupal.org Wed Sep 2 17:19:49 2009 From: drupal-cvs@drupal.org To: drupal-cvs@drupal.org Subject: [contributions(DRUPAL-6--1):jrglasgow] /modules/wlw_blogapi wlw_blogapi.module Date: Wed, 02 Sep 2009 17:19:49 +0000 Message-ID: <20090902171949.936B7340D1@mail.drupal.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4650753837190489601==" --===============4650753837190489601== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable User: jrglasgow Branch: DRUPAL-6--1 Date: Wed, 02 Sep 2009 17:19:49 +0000 Modified files: /modules/wlw_blogapi wlw_blogapi.module Log message: #371400 by mcload: Fixed Windows Live Writer BlogAPI Error. When the server has E_NOTICE turned on every little thing like checking the= value of an uninitialized variable throws a notice.=20 =20 The is especially harmful when the expected result for the page request is = to be parsed by a program that is not very good at ignoring notices that brea= k the expected syntax of the XML it is expecting to receive.=20 =20 The module was checking the value of a couple of possibly uninitialized var= iables in this function and causing notices to be thrown. =20 I have changed the function to use the empty() function which
empty() is the opposite of (boolean) var, except that no warning is generat= ed when the variable is not set.
FYI - production site should never have E_NOTICE set. Links: http://cvs.drupal.org/diff.php?path=3Dcontributions/modules/wlw_blogapi/wlw= _blogapi.module&old=3D1.16.2.6&new=3D1.16.2.7&root=3Dcontrib --===============4650753837190489601==--