Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54961 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45856 invoked from network); 26 Aug 2011 02:55:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Aug 2011 02:55:34 -0000 Authentication-Results: pb1.pair.com header.from=alan@akbkhome.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=alan@akbkhome.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain akbkhome.com designates 202.81.246.113 as permitted sender) X-PHP-List-Original-Sender: alan@akbkhome.com X-Host-Fingerprint: 202.81.246.113 246-113.netfront.net Received: from [202.81.246.113] ([202.81.246.113:34779] helo=246-113.netfront.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 98/93-22704-42B075E4 for ; Thu, 25 Aug 2011 22:55:33 -0400 Received: from static-ip-251-82-134-202.rev.dyxnet.com ([202.134.82.251] helo=[192.168.1.96]) by akbkhome.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Mailfort v1.2) (envelope-from ) id 1QwmZs-0001Pp-9p for internals@lists.php.net; Fri, 26 Aug 2011 10:55:28 +0800 Message-ID: <4E570B05.6020809@akbkhome.com> Date: Fri, 26 Aug 2011 10:55:01 +0800 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-mailfort-sig: addbb9dcf2b813c659d78368ced64754 Subject: is_a() consequences..... From: alan@akbkhome.com (Alan Knowles) I've committed the fixes for my two of my packages to support this change.. Who ever thinks this is such a great idea, could you kindly file bugs against all the packages below to request they fix their 'bugs' or verify the input........ http://pear.php.net/bugs/ Since the behaviour of is_a() is now is_a(mixed, string), if any of the first arguments is a string that matches the class name, or it's parent or causes the autoloader to load a class such a class it will produce unpredicatable results now. This is not a full list, as I only have a partial copy of all pear packages. Date/Span.php:182: if (is_a($time, 'date_span')) { Date/Span.php:184: } elseif (is_a($time, 'date') and is_a($format, 'date')) { Date/Span.php:536: if (!is_a($date1, 'date') or !is_a($date2, 'date')) { Date/Span.php:571: if (is_a($time, 'date_span')) { Date.php:204: } elseif (is_a($date, 'Date')) { Date.php:552: if(is_a($tz, 'Date_Timezone')) { Date.php:746: if (!is_a($span, 'Date_Span')) { Date.php:821: if (!is_a($span, 'Date_Span')) { DB/common.php:1252: if (is_a($result, 'DB_result')) { DB/mysqli.php:996: if (!is_a($id, 'mysqli_result')) { DB.php:594: return is_a($value, 'DB_Error'); HTTP/Request.php:692: if (!is_a($this->_url, 'Net_URL')) { HTTP/Request.php:1078: if (!is_a($listener, 'HTTP_Request_Listener')) { HTTP/Request.php:1095: if (!is_a($listener, 'HTTP_Request_Listener') || I18Nv2/DecoratedList.php:51: if (is_a($list, 'I18Nv2_CommonList') || I18Nv2/DecoratedList.php:52: is_a($list, 'I18Nv2_DecoratedList')) { Image/Graph.php:161: } elseif (is_a($params, 'Image_Canvas')) { Image/Graph.php:211: if (!is_a($this->_canvas, 'Image_Canvas')) { Image/Graph.php:595: if (!(is_a($part1, 'Image_Graph_Element'))) { Image/Graph.php:599: if (!(is_a($part2, 'Image_Graph_Element'))) { Image/Graph/Title.php:154: if (is_a($this->_parent, 'Image_Graph_Plotarea')) { Image/Graph/Title.php:161: } elseif (!is_a($this->_parent, 'Image_Graph_Layout')) { Image/Graph/Plot.php:119: if (!is_a($dataset, 'Image_Graph_Dataset')) { Image/Graph/Plot.php:123: if (!is_a($dataset[$key], 'Image_Graph_Dataset')) { Image/Graph/Plot.php:756: if (is_a($this->_fillStyle, 'Image_Graph_Fill')) { Image/Graph/Common.php:49: return is_a(get_parent_class($object), $class_name); Image/Graph/Common.php:180: } elseif (is_a($this->_parent, 'Image_Graph_Common')) { Image/Graph/Common.php:200: if (!is_a($element, 'Image_Graph_Font')) { Image/Graph/Common.php:295: if (($this->_canvas == null) || (!is_a($this->_canvas, 'Image_Canvas'))) { Image/Graph/Marker/Average.php:65: (is_a($this->_parent, 'Image_Graph_Plot'))) Image/Graph/Marker/Array.php:71: if (is_a($marker, 'Image_Graph_Element')) { Image/Graph/Marker.php:105: if (is_a($this->_secondaryMarker, 'Image_Graph_Marker')) { Image/Graph/Legend.php:99: if (is_a($plotarea, 'Image_Graph_Plotarea')) { Image/Graph/Legend.php:103: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Legend.php:162: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Legend.php:194: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Legend.php:259: if (is_a($plotarea, 'Image_Graph_Plotarea')) { Image/Graph/Legend.php:332: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Legend.php:348: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Legend.php:371: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Line/Array.php:74: if (is_a($style, 'Image_Graph_Element')) { Image/Graph/Plotarea.php:221: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Plotarea.php:225: } elseif (is_a($element, 'Image_Graph_Grid')) { Image/Graph/Plotarea.php:252: } elseif (is_a($element, 'Image_Graph_Axis')) { Image/Graph/Plotarea.php:334: if (is_a($dataset, 'Image_Graph_Dataset')) { Image/Graph/Plotarea.php:624: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Plotarea.php:625: if (((is_a($element, 'Image_Graph_Plot_Bar')) || Image/Graph/Plotarea.php:626: (is_a($element, 'Image_Graph_Plot_Step')) || Image/Graph/Plotarea.php:627: (is_a($element, 'Image_Graph_Plot_Dot')) || Image/Graph/Plotarea.php:628: (is_a($element, 'Image_Graph_Plot_CandleStick')) || Image/Graph/Plotarea.php:629: (is_a($element, 'Image_Graph_Plot_BoxWhisker')) || Image/Graph/Plotarea.php:630: (is_a($element, 'Image_Graph_Plot_Impulse'))) && Image/Graph/Layout/Horizontal.php:94: if (!is_a($part1, 'Image_Graph_Layout')) { Image/Graph/Layout/Horizontal.php:99: } elseif (!is_a($part2, 'Image_Graph_Layout')) { Image/Graph/Plot/Smoothed/Radar.php:63: if (is_a($this->_parent, 'Image_Graph_Plotarea_Radar')) { Image/Graph/Plot/Radar.php:89: if (is_a($this->_parent, 'Image_Graph_Plotarea_Radar')) { Image/Graph/Plot/Odo.php:650: if (is_a($this->_fillStyle, "Image_Graph_Fill")) { Image/Graph/Plot/Pie.php:510: if (is_a($this->_fillStyle, "Image_Graph_Fill")) { Image/Graph/Plotarea/Radar.php:193: if (is_a($element, 'Image_Graph_Plot')) { Image/Graph/Element.php:159: if (!is_a($background, 'Image_Graph_Fill')) { Image/Graph/Element.php:220: if (!is_a($borderStyle, 'Image_Graph_Line')) { Image/Graph/Element.php:330: if (!is_a($fillStyle, 'Image_Graph_Fill')) { Image/Graph/Element.php:426: if (!is_a($font, 'Image_Graph_Font')) { Image/Graph/Grid.php:106: if (is_a($this->_secondaryAxis, 'Image_Graph_Axis_Radar')) { Log/composite.php:202: if (!is_a($child, 'Log')) { Log/composite.php:222: if (!is_a($child, 'Log') || !isset($this->_children[$child->_id])) { Log.php:772: if (!is_a($observer, 'Log_observer')) { Log.php:794: if (!is_a($observer, 'Log_observer') || Mail/sendmail.php:112: if (is_a($result, 'PEAR_Error')) { Mail/sendmail.php:117: if (is_a($recipients, 'PEAR_Error')) { Mail/sendmail.php:123: if (is_a($headerElements, 'PEAR_Error')) { Mail/smtpmx.php:257: if (is_a($result, 'PEAR_Error')) { Mail/smtpmx.php:263: if (is_a($headerElements, 'PEAR_Error')) { Mail/smtpmx.php:278: if (is_a($recipients, 'PEAR_Error')) { Mail/smtpmx.php:286: if (is_a($mx, 'PEAR_Error')) { Mail/smtpmx.php:306: if (is_a($res, 'PEAR_Error')) { Mail/smtpmx.php:330: if (is_a($res, 'PEAR_Error')) { Mail/smtpmx.php:339: if (is_a($res, 'PEAR_Error')) { Mail/smtpmx.php:346: if (is_a($res, 'PEAR_Error')) { Mail/smtpmx.php:355: if (is_a($res, 'PEAR_Error')) { Mail/smtpmx.php:366: if (is_a($res, 'PEAR_Error')) { Mail/smtpmx.php:393: if (is_a($res, 'PEAR_Error')) { Mail/mail.php:97: if (is_a($result, 'PEAR_Error')) { Mail/mail.php:120: if (is_a($headerElements, 'PEAR_Error')) { Mail/smtp.php:233: if (is_a($headerElements, 'PEAR_Error')) { Mail/smtp.php:267: if (is_a($recipients, 'PEAR_Error')) { Mail/smtp.php:275: if (is_a($res, 'PEAR_Error')) { Mail/smtp.php:287: if (is_a($res, 'PEAR_Error')) { Mail/mimeDecode.php:200: $isStatic = empty($this) || !is_a($this, __CLASS__); Mail.php:96: if (is_a($result, 'PEAR_Error')) { Mail.php:163: if (is_a($addresses, 'PEAR_Error')) { Mail.php:231: if (is_a($addresses, 'PEAR_Error')) { MDB2/Driver/Datatype/Common.php:1379: if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) { MDB2/Driver/Datatype/Common.php:1408: if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) { MDB2/Driver/Datatype/Common.php:1437: if (isset($db->function) && is_a($db->function, 'MDB2_Driver_Function_Common')) { MDB2.php:596: if (is_a($data, 'MDB2_Error')) { MDB2.php:623: return is_a($value, 'MDB2_Driver_Common'); MDB2.php:640: return is_a($value, 'MDB2_Result'); MDB2.php:657: return is_a($value, 'MDB2_Result_Common'); MDB2.php:674: return is_a($value, 'MDB2_Statement'); OLE.php:240: if (is_a($blockIdOrPps, 'OLE_PPS')) { PEAR/ErrorStack.php:636: if (is_a($logger, 'Log')) { PEAR/Common.php:256: if (is_a($ui, 'PEAR_Frontend')) { PEAR/Common.php:541: if (!is_a($pf, 'PEAR_PackageFile_v2')) { PEAR/Autoloader.php:175: if (is_a($obj, $classname)) { PEAR/Frontend.php:79: is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], $uiclass)) { PEAR/Frontend.php:94: if (is_a($obj, 'PEAR_Frontend')) { PEAR/Frontend.php:119: is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) { PEAR/Frontend.php:123: if (!is_a($uiobject, 'PEAR_Frontend')) { PEAR/Downloader/Package.php:1310: if (!is_a($param, 'PEAR_Downloader_Package')) { PEAR/Registry.php:201: if (!is_a($pear_channel, 'PEAR_ChannelFile') || !$pear_channel->validate()) { PEAR/Registry.php:226: if (!is_a($pecl_channel, 'PEAR_ChannelFile') || !$pecl_channel->validate()) { PEAR/Registry.php:250: if (!is_a($doc_channel, 'PEAR_ChannelFile') || !$doc_channel->validate()) { PEAR/Registry.php:941: if (!is_a($channel, 'PEAR_ChannelFile')) { PEAR/Registry.php:1028: if (!is_a($channel, 'PEAR_ChannelFile')) { PEAR/Registry.php:1327: if (!is_a($info, 'PEAR_PackageFile_v1') && !is_a($info, 'PEAR_PackageFile_v2')) { PEAR/Registry.php:1824: if ($ret && is_a($this->_config, 'PEAR_Config')) { PEAR/Registry.php:1841: if (!is_a($channel, 'PEAR_ChannelFile') || !$channel->validate()) { PEAR/Registry.php:1851: if (!$update && $ret && is_a($this->_config, 'PEAR_Config')) { PEAR/Builder.php:272: if (is_a($pkg, 'PEAR_PackageFile_v1')) { PEAR/PackageFile/v2.php:1899: !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { PEAR/PackageFile/v2.php:1914: !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { PEAR/Command/Remote.php:168: if (!is_a($chan, 'PEAR_ChannelFile')) { PEAR/Command/Pickle.php:151: if (!is_a($pf2, 'PEAR_PackageFile_v2')) { PEAR/Command/Package.php:1081: if (is_a($pf, 'PEAR_PackageFile_v2')) { PEAR.php:268: if (!is_a($data, 'PEAR_Error')) { Structures/Graph.php:104: if (!is_a($newNode, 'Structures_Graph_Node')) return Pear::raiseError('Structures_Graph::addNode received an object that is not a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC); Structures/Graph/Manipulator/AcyclicTest.php:128: if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_AcyclicTest::isAcyclic received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC); Structures/Graph/Manipulator/TopologicalSorter.php:133: if (!is_a($graph, 'Structures_Graph')) return Pear::raiseError('Structures_Graph_Manipulator_TopologicalSorter::sort received an object that is not a Structures_Graph', STRUCTURES_GRAPH_ERROR_GENERIC); Structures/Graph/Node.php:240: if (!is_a($destinationNode, 'Structures_Graph_Node')) return Pear::raiseError('Structures_Graph_Node::connectTo received an object that is not a Structures_Graph_Node', STRUCTURES_GRAPH_ERROR_GENERIC); Translation2/Decorator.php:135: } elseif (is_a($this->translation2, 'Translation2_Decorator')) { Validate.php:886: if (is_a($min, 'Date') && Validate.php:901: if (is_a($max, 'Date') && XML/Spreadsheet/Writer.php:58: if (is_a($cnode,'DomElement')) { XML/Spreadsheet/Writer.php:77: if (!is_a($this->worksheet,'PEAR_Error')) { XML/Spreadsheet/Writer.php:255: if (is_a($cnode,'DomText')) { XML/RPC/Server.php:629: if (!is_a($r, 'XML_RPC_Response')) { XML/RPC.php:600: return is_a($value, 'PEAR_Error'); XML/RPC.php:876: if (!is_a($msg, 'XML_RPC_Message')) {