This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** Adminer Editor - Compact database editor |
||
3 | * @link https://www.adminer.org/ |
||
4 | * @author Jakub Vrana, http://www.vrana.cz/ |
||
5 | * @copyright 2009 Jakub Vrana |
||
6 | * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 |
||
7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) |
||
8 | * @version 4.2.5 |
||
9 | View Code Duplication | */error_reporting(6135);$Hb=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($Hb||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$V){$Ae=filter_input_array(constant("INPUT$V"),FILTER_UNSAFE_RAW);if($Ae)$$V=$Ae;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");if(isset($_GET["file"])){if($_SERVER["HTTP_IF_MODIFIED_SINCE"]){header("HTTP/1.1 304 Not Modified");exit;}header("Expires: ".gmdate("D, d M Y H:i:s",time()+365*24*60*60)." GMT");header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");if($_GET["file"]=="favicon.ico"){header("Content-Type: image/x-icon");echo |
|
0 ignored issues
–
show
|
|||
10 | lzw_decompress("\0\0\0` \0„\0\n @\0´C„è\"\0`EãQ¸àÿ‡?ÀtvM'”JdÁd\\Œb0\0Ä\"™ÀfÓˆ¤îs5›ÏçÑAXPaJ“0„¥‘8„#RŠT©‘z`ˆ#.©ÇcíXÃþÈ€?À-\0¡Im? .«M¶€\0ȯ(̉ýÀ/(%Œ\0");}elseif($_GET["file"]=="default.css"){header("Content-Type: text/css; charset=utf-8");echo |
||
11 | lzw_decompress("\n1̇“ÙŒÞl7œ‡B1„4vb0˜Ífs‘¼ên2BÌѱ٘Þn:‡#(¼b.\rDc)ÈÈa7E„‘¤Âl¦Ã±”èi1ÌŽs˜´ç-4™‡fÓ ÈÎi7†³é†„ŽŒFé”vt2ž‚Ó!–r0Ïãã£t~½U'3M€ÉW„B¦'cÍPÂ:6T\rc£A¾zr_îWK¶\r-¼VNFS%~Ãc²Ùí&›\\^ÊrÀ›æu‚ŎÞôÙ‹4'7k¶è¯ÂãQÔæhš'g\rFB\ryT7SS¥PÐ1=ǤcIèÊ:d”ºm>£S8L†Jœt.M¢Š Ï‹`'C¡¼ÛÐ889¤È ŽQØýŒî2#8У’˜6mú²†ðjˆ¢h«<…Œ°«Œ9/ë˜ç:Jê)Ê‚¤\0d>!\0Z‡ˆvì»në¾ð¼o(Úó¥ÉkÔ7½sàù>Œî†!ÐR\"*nSý\0@P\"Áè’(‹#[¶¥£@g¹oü’znþ9k¤8†nš™ª1´I*ˆô=Ín²¤ª¸è0«c(ö;¾Ã Ðè!°üë*cì÷>ÎŽ¬E7DñLJ© 1ÊJ=ÓÚÞ1L‚û?Ðs=#`Ê3\$4ì€úÈuȱÌÎzGÑC YAt«?;×QÒk&ÇïYP¿uèåǯ}UaHV%G;ƒs¼”<A\0\\¼ÔPÑ\\œ&ªóV¦ð\n£SUÃtíÅÇrŒêˆÆ2¤ l^íZ6˜ej…Á³A·dó[ÝsÕ¶ˆJP”ªÊóˆÒŒŠ8è=»ƒ˜à6#Ë‚74*óŸ¨#eÈÀÞ!Õ7{Æ6“¿<oÍCª9v[–MôÅ-`Óõkö>ŽlÙÚ´‹åIªƒHÚ3xú€›äw0t6¾Ã%MR%³½jhÚB˜<´\0ÉAQ<P<:šãu/¤;\\> Ë-¹„ʈÍÁQH\nv¡L+vÖæì<ï\rèåvàöî¹\\* àÉçÓ´Ý¢gŒnË©¸¹TЩ2P•\r¨øß‹\"+z 8£ ¶:#€ÊèÃÎ2‹ºJ[i—‚£¨;z˜ûÑô¡rÊ3#¨Ù‰ :ãní\r㽃eÙpdÝÝ è2cˆê4²k¿Š£\rG•æE6_²ªÊØÞ‰b‹ž/Œ«HB%ò0ë¢>ÈÈðhoWÃnxlÖ æµƒCQ^€°ÐÔÿßñ\r„о¶4lK{þZÆü:†ÐÜß.¦p¨§Ä‚éJóB-Å+B”´‘(ëTòŸ%®µJ›0ªlØT¶`+É-Á¾@BÚáÛ„Vá’Ä\0ÂÏC¼,ì¯0tâàŒF‡‰å?Ä Ë\na@ÉŒ>‚âZEC“ôOŽ-曤^Q€&ßÖù)I)®¤ÄÀR„]\r¡”9”7_ˆ¢\rÉF80µObù €‘î>ºäý\nRý_ˆÑ8æ‚ØÙ«äov0¤bCA¸F!Ñt—–ă%0”/‘zAYO(4«‹¡ˆ¨Ò 'Ÿ] Iéí8hHÂ05˜3ò@x&nˆ’|TÓ³³)`.“s6eY˜D¦z¸Œ®¥ƒJÑ“ôž.„ñ{GEb¹Ó‹¡˜‹†2Õ×{\$**ý¾@ÝCž-:zYHZIôà5F]¦²YúùCªOêAÂÚó`x'´.*9t'{ÿ(êšwP¶¾ Ñ=¢*‰†ú*üxwråÔ*c‚žÌc|„DŸ“ÚV—–\r†V.‡0âÆ™V¤dˆ?Ò€üê,EÍ`T¦É6Ûˆ-“Åì¾ÅÚŽT[Ѫz©‚.Ar±£Í€Pøºnƒc=aÔ9Fònß!ÙuáÎA©Þƒ0iPó¬”îºJ6eäT]VØ[\rXÌáaŸ–vkõ\n+EˆáÜ•*\0¶~¶Æù@g\"ÌNCI\$àÉŒƒ€êx@WÃy¼*vuDÙ\0ÞvœëŒ†V\0èV`Gç½uµE®Ö•ÂÁf“l˜h’@ï)0@šT•°7‹íÛ§RAÊÙ·ò´3ۘЫ/QÇ]ª,sÖ{VRž±¡ŽöF«¡A˜„<¨v×¥î´%@9‚ÀF¢Õ5t‰%Ö+º/¢8;¾WÑäÚÇJïÐo:ÖNÿ`ø •ÿš´hìÁ{Ü£•î ËÔ8ÔEuª&°W|Ɇ„‰®Uú&\r\"ÔÁ»‰|-udž…Në¶:nc²©fV‹ÂÃè#U20å>\"®²Ç>Ì`œk]î-¯ÇxùSØÍ‡Ð¢©‰‚êcâ¡óB’—}Ø&`ˆîr+E“\$œyNýŒ±b,†´´Wx þ-9åÕrÓ,’ü`å+œïíËŠù’CœÓ)˜˜7Ûx\r¬þWµfMŒSR¼\\èz¦ÙQ²Ì“”uA¬ºê2ޱõ4îL&ËHi µ°²¹S\$)e³“æg rÈŒ©ƒ\$]ZëiYs¤õ×kW–n>µ7E1k8ÐdÃró®škÁý¢ëEÞÙÛwÂwcmŽTy¹•ë¿a›\$tx\rB´÷=Šö¢*”<ȃ l¡fôKœ‘N/¶¼ ÃlÕáükH“õ8 .‘‘ù?f÷›Úÿã6†Ñ‡¼{gi/\"à@–K›ñ@2ãça|#,Z¤±‡ ³ñwˆd¬™“²…¼å6w™^&Áêt™çœP±…¥Äù]À¼›.àãÚí¡TìîkroÀ‰÷\ro=—%æ×h`:\0᱂ö«”|ꊣ«a“Ô®6*:ÍÓ*‡ÊrO-^–’ñén«Íó§MÆ}æ»÷ÆAya±Ý\nƒu^ì–ÀrnO\r±»¡`þT~</ð¶wÄyþ}æ:›|£ÏÐûÖÌ¡6»¤×ø®Ÿvî\rc<·b#ûàô§†î–\$ùsµê|燇V)«h‹TCùñ(Ľñ£È}");}elseif($_GET["file"]=="functions.js"){header("Content-Type: text/javascript; charset=utf-8");echo |
||
12 | lzw_decompress("f:›ŒgCI¼Ü\n0›†S‘Øa9œÅS`°Çˆ“Œ&Ó(°Ên0˜†QIìÒf‰›\$±At^ sG²Étf6eŒ§yŒÊ()LäSÁÀP'…ÂáÌR'Ífq]\"˜s> )â‘`œH2ŠEq9ˆÊ?ˆ*)‰”t'°ŽÏ§Ø\n \ræs<ŒPi2INÆ*(=2ÌgXá¸è.3™N„Y4èB<’L—üîi©Ì¥2Ý´z=š0HøžÐ'·êŒšÃuÆtt:œÂ¡Èêe¹]`pX9ŒÞo5šgòóIœÜ,2O4ãÞÑ…MÆS¸(ˆa…Š#¾Äàç’ïø|¹G‚bèôüxœ^Z[Çä™G¼ÎuTvª(Òm@Vò¸(†¼ÈbN<ŠÈ`æâXä1É+Œä9J8Â2\r£K¶9ðhå Áè`…‹ÆëI8ä›±S±ãt÷2ƒ+,£ÆIºã £pæ9m@Ð:ƒ€æáxï)…ÐüC…Ãxä3…ñ4P7áü-4Çr\"p3Fhà…-5ƒ”U4͉¸\\6°ƒ<D\$®l—9ÍR4t7ƒdD3µpÞΓkÌ:)\\;° ÐÔð\r@Žt…\$4O£<þ†!pdÇÔÚQJ\rÌHî}:&Œ¨ˆÂÈ„Á5YWJ˜‹±Â`ÓN£èbKNSÉÀÉa§Ž•ƒ´d>2WñÅ…bDj:9[21c„»È€:Xé@ËqË#“›4íL™'J”©+DHeÒ3¬.«O ÇK˰“ˆ…pV…át2Œwp;Æ“…íÿ\r?èOzDq.ª°Ð-†\"ìZñ®cèX3!/>PúFìsØÉ²±Ã0Í(òóˆ°Ê£€àŒ‚T63sVQo¸€SΑ b²ß…^r\$É@C© r2)©Œ£ “VÀ)+nÜ·zÃÁúålÚè{³K#…À9‹{†Û¯lÀºìmÐQ¨ëh»*É—PÄ:¡c˜]´7ãàø=¡LŸŒi;”2û¿§ÜÒ<\\Jí¤Øb¥n”…ƒ¥nÁ_iÓ´îJ\n†¢¨âòŽõC:ª„‘`N4¶Ì–È'Aw:4}ÊÛ£ÁW\080‘ÇL3õÊJ;èiú)\\„=/NŠu=ZV6&ceaè±ÂpÞÖ.[ëvŠtPZÞèX`Ö”õŒ+zú'¦ê9½.\$\$…Ó@\n\ré]_ïÙ®¢Âh¨kk¬Ms>`Ì–ƒj¹%\\9жÆÔ('°jAˆ>BCd\"K\$ CAÆ ä„¤.².`‰â.EÑæ´–ÌÃyy\0‹D2Ï8t Ð6†Ã8¬FL«´×ÞíâŒB*¬ð,Ò|\nx\\@ °@¸Ø3r ¬ðÎWKQb,%…¯´DBfØÈ³D|ÍŒËE0/2>£Y!Ć'õ™`æf™mHº<BãB0\r*\0Gxò‰nêY4‚¶¾Œ,žL²©º–öÅ%SÆ,ýv‡0ê‘–XòQÄ1†HId`‡!.ÔVÊ›H/Åú×ÀHãù0ÆUÁ¸0™©Ž`îLI©8ÖÃkŠ”2Œ4JYNÅ&8xä¥JØk:AKã¡nWØ!¦¿Iï;'ô³\":2ðê‹4Í~óJ„8ô£á’‘¨âG‡™\"MÊ=\rZ'ŽnÇi9F§œ“™rÆ’RÊt‚3\0Ÿ”Ò²Â2µy‚B^òèb'´ÒzÈɲ(#”d9Itµ&WØjNa¨ÚC(¥ j”Ä–?h‰ÂØj†¡™©Ö„Z\$0«¡Ò¯´J A_\n†!TOó4Œ<{aôú?˜æo ú‚-¹–ÃÏ?Hlÿ\"2ƒy™=Ú먞 R©ðœÑ„àš°–ÍŠëP&åG›ÀÁ4ƒË%()¤\r5Mª‚‰ÓLTí\0ÀºxBIç=ltvÄ2Jhvû´~/:èpý×:8\"д5¡«‰0î#Ž*ì7ªøúÜ\nàq×>è¡G\$°â…): ƒ»\"ù#ë¦KfI‡!vö+?{¡Íÿ¾Qg¥{ÏR÷Q øC䪎}Õ#¸éiIbgà„ÔXàÄÃÂù}ÅË`‹}3—%@îÁ{_kø}0ä±þÈ—Öp !°aï—<7«e•‰ÖF‡?¦¸¡î½XüDùÑ, ØÊCk‰ƒíU™ØL>£1‹§Ü܇¥ã‡Œp0Ž#Ä\$²ÅâV)pYs5A˜:°ÊUÈ(9…5×™,F+&Ÿ*{âŒ-£Íìç:÷Ší :7¦þ:Ê™yPãè—´ŠÀXÏ+¤Ž’\nÞI;üþ\\s„÷Pà÷1‘‘ìÈr©¦NJËAT'-£”òk?ƒÙY@“¡Ïö±fÇÍbñŽ’”RîJÏiömÖB~ò©”K\rK«œtª4à÷;OŠKc”9%Hì5àÍd¢3ÙÀe8j¿P÷±[sð™9,ƒÄ˜—bzK‰µÁòW&e¢d8ú§)Äùé5•pí˜hù°ëéÃà¹\"0hL5\0˜7 æÚŒÚ‡Ÿ{ïÀÝ¿¸Ýðî´<åk‚²\r+üXÅblåè/ØX ìAC¨s\na¤‘l÷Çí°}·~Ý´— drx(\rè3ÎnGrÃTÄ+àQÏÁJ¹éï†PÌ\nØ'?À€Ä´n~º:· µòâQà8€»¦†`{ÙaÜÊ æ4:„ôLê:Ò öð§›ÉÜuMó„®ßŽM¯IÁ…,†`ÍBgN€¯Âÿ\rBº•\r\0ûÂoé\"¼/‡2^D2)n¸\razR\$à7¢`ÍØ¹¨äèL³p®*Ò{`Oqt–z%%éHg§¹¦ 0¸…ÍKÃf&Ì)\\ÐQW¦öù‡†\0dp¾Ü<Q\"è„c”ÑÏ'ÿ/ÃQ7>¾+ù¿j#\0åîȺБ_ðÈôk3ëJº(óÜê%Oꌣ\0³Tm4³k:lÊž¤mD\$°¦¬×\0éê´èº'¢~à¶ Z@º€¶ŒàV⺀L\"ãHjnæ¾5€ðNlŠŽÌþþ‹šfj&›Mí•OüÓdbÓ°RÓð´OdiiÞNÐ(¿%-4+Ð:HpR¦§?BàM0š¶JF¢.ÚòÏ1Mö»f~U¬Tê°ŠÒlË 0…þËÀòUÅÂ|âÀЂ@òˆX4àbgè ]Pè?@z `…â<ðÐRîÔú`úí-¸þF˜ÎI\0Ñåþ㬦|О…ð¸ê¸Å¬TkQk°F@0Lõì˜Pƒ\rÀšˆ#ÎuØÍËïàܲpXÿ^ѱap\0\r y´Pt%\0^8ÆÒ\r¤Àµ‘Šk©£\0Ç¡1“\n¢dñ…â B± §.\níQjq\$\rM˾F£ê®oî²êî(︉ [‘ .#>¦ð¬Q„`Y`íMÑÊ,ÿJ†ñí\n<³‘uÑzÔ+I ÒÃ!)Üï+ØtñìÅŠ¼Åâºÿ¯lÆœm\"\"17\"jÀ0#N±m– ÂÙ¢æ–O pRÂK#ŒRÅç7#C´&ãÉ!2\$ÅÒ>†Ïœ”CÞ.R\"Ír‚ã\"PÈy˰7¨\rçܼ¤s)Õ%Ð#‡U\rOÄEÐ€Ôøî«Æy”xCt@п¨û*HàÇ é+@ÀàÈ0Õ\r’˜‡I‚¡ŽìL²¸²˜‚ˆ/ \\\rNR\r\0¨@+û\$Š©/*w0ËS\nt¢\"ä–\0ær‘/¬ÃPøÃðí\0ù3L¿°í%rïRÈ2R*º+÷0Ó\"¿-¾3N1âD7(tb’ê/@Ý12º†M6↬dÈ(á“c7‹*–Épãl8²„å(t·0ÚKpÚ2Ù-ÐæÇðÞFbîƒ\$¼Røï(/ó+2îã,̲ËlºËï8¬Ïø–éróK!ç©6\"»Sa0bxÓà¾\$O\0\re‰ ¨\r\"8ˆ'‘ót³Œ\r³ù+£Pá@Y1°£Yb”Râ¹°Ú\\jK)÷438 hÌ1ó7 z`pðRŽR“CÒñBöîô<»Åöõ…”F 4çDtJ-¶tVå©D6\0NLåTå”v_â0ó‹\"qJ†ëIÅ•è*Ì.ô¾«àqÂR|´¯HÀÎ t]>ˆ\0€OL(#énŽ.®2Bn9Jm‘@R s2|”Úh”ÞtãNn6B“cO+âšÒ†È e¤ÊåÐËBO=,ÀÀC:Ô6ô:¸M<àä—BV\\`¦/BŒïÚ§Û,w:‘H°Í¸û2xpšM„nbn«¢Õ„‹0†ÎÕ 1Ö,4µV§#& lËâ×ÍjKCš\n‰gÍâl\rè¶IcY@ÏY‰h–3Û\nU’]@Î ÂÔ\rLÕdñ\\Bœ ú–\"t\r¯p'\nå‡'àO\\©ÆRИֳÚ5øáS†¤b%§[•¬\$‚LÕuó`5—Y®òÕu©[ÕÌÔ\0|EMh—µË\\)É\\u¶9¶bÉH.e@\r€à!Åe'µVPä¶C'c\"úf(RŇ&#~À–\\qHû]Ã{^Âðž¿ög'OÈ<vz‰6lpÕâg'8E–{ô*/¹UÖVû‰¤þpì¶ýo,ï¸+´Ôþ)X¯ëk.ÿ0`ÿsðÓ0h“r“°o^²œð¦†°ŸB\"åjçOk-õ§%Æ0Æü“gÒxú+Ø Õ[àP7\"*hPP„\rc <ø[`æëV¢ â7å:`‹˜Uà°à(–I¢ƒs*dã¶;·> —BGsG t:À‚8d\0ž@ÔjwLvj —ow7v bŽ ¨püàæñÃu-þ\n€ , u:)âÕ\"ut…:îWB<S†b1ñò2éCײS·¸d†%)rÀ÷pÕ¿{cpqMú!þà#P‘ì·#@ E}c\"@|d%kr£\"* xñí€ w}×´uWâ¦Âl&X~S‚B'uà@6Chº..ÚØ'Ø+@ÊêÓƒƒ[T÷¬1àßæþb\"Ð\n\0ž\n`©I\0ޏn+—/Æ\"lW1uÆ´—Z¦DøCâ(è€1Äp¶wм…®Ä À^\0ZJ`î¨b·#ãŒ5€É„«ˆH“ˆ¥;ˆäâ(à°¸Ì!`ȯ#^»y…ß§ƒ…¨VGrß|Â_ïµpGåe‚QŒjd'2I-÷áÀh¤ ^Àda)×…:HØH)Ä5q·X‚¦FQ_·Û{8)~N~Ž\"`™\$1øøå ”ùàñ³‚ßB_‚üàå€ ñÏN^¥h[˜Nø(”+‚ÃM„wÏ™P€'pŒ65b?ƒÑ´â†ù“y&<åZTãq,9Op¹@2M¾‰ØzÄ•Pq4`eo¥”é¤b\"fmŽvùX@…c9a0Çw Db ø~úˆ”‰ˆW\"u@·J‡rŠi8È0øè0—ü#³}7+ž€¶ok¾@³öœ\n)lÑr³Êý%vÚ܇Ë!¬®Õân{‚XYw*,Íìb™«‚F€^\r1Œy5šðBYùÕœ#w:3&jÙB©îÀàð„fY`Þ“— ù§BI§š|l¨0òÇÓ«ãO£r[rEa0bÉ‹àÊ\n ¤ (€\r¹öGFžª@ؼÃúÙÀß® 1ÓÄГS¢Âs+£X‡´%@u¨g9zfSž†#0 ÞDBŽÍ _wÂé¯EÀÕ Bî>š{§ó÷*@Ð}kã²÷Ƚà¸à\\P’,\"ª-rCÉrVäæY×·žžZ\rœ÷É[ùS}\0YŸ%kŸcÏ–2ývs\rK¹îÈOÅT@èçs›Ê!Èü2ÑÒcwË’ívǺÔ,4&™rxrÒØ‡ì~€È#Ì\"¿€Xã\rÎ];SF²½Fî‡<ta/ƒMé&ìU>ìÿ5s ¿ÀSÀçÿ>Æ6¿ì¬U{öåËp!\"yô7M’me÷Z„D!*vÅwæWê ‰û0Êw0ÇŒ1Š|H\$&Ô‰+{ÃìGRH!rÔ-ù24‘lµ¦\rÐå\r™\0ãÞÊt<Æ…Æ·fè:“DSÀdúeQóÑ\r\\¶aò°Ëç¹EôbGŽÏà„m äg¢x-T’¶ÅGÅYKÆ¢‡tp0®?ž¦Frx ï2\\òVãÁ2;'\n€‡Á+ù‰b1ÝÎDG–5´—¯l'(ó¥/[Å,N÷Á(nG8óÀb€XQ* àÁ-R¿–¢¹¤\n4q#[Uš<eƒÔÄ`æ&&Õoë@î›uÒ%â5\0¸ `\0‚E}#lʨUäx%m‡Y&P®bÍ•«.ëÏÏ¡Û1<jnÇǃÜ\nV~o´Nïp\n€Þã\$EÀ&Ô#íÞ%G\0²þ=¼ ekÝÒ–QŠCÂ<}ö]ÔA½Ù-Yb;ฆ¥[ÝÚüþ žU¤YßcÇÏ~¿šT.\\Å<Wn\\oPÀÅüÞqƉ6P\nsàã`‘º„ü¦c:–3›([ÅÀzX¨ÙÙ{ Pì\\Èç‚«²€W®ãY¯:ß®:ýä#®¥½ž9´èYê¹[¹Yút&lç9kÞ±ŸY_Ò‰bÍ~¡¢&Õvã ý*1þÍÅ`ÕfÌ8—·S§øV^ÛÜ'åâ¾î›}±»l³Ûz8üØÿÜæ ÂZGbÜÕ_àÓ]„â¢ÄfpJŠ€Z–0Ÿ¥@Vãÿ'žõuö–yÆÌ €ÞCñR'Nö…—?Yôå–Ök €è\$cöáÎ à=ì¿ní äYJì>PíRì¢Jð•×]µß.µä짃çÙÚì»};;SÇ]ãñ@ËÇè:Ââ“÷I~Û‘•ÙùÒÁ|;¾£FyäÆƒåÀ}`ó/ßã-éí#ä1¥@yõ®7øïÜys}¿\$A¨a\\™<xGÞ•Ö¨BmamZxý3Ž,}Ï:Ð\nÝd9¿‰Î‹ö} HÞÐmµT,/KêΪ (œæìShâ…:Âø°¼Vð,Nµ\\ ïÀø\r€B%¸YŠvãi,•å€pyrrH”ó&ëdL%(ë@L¾Ð5‚’T@1`Ù ¦:”Öî\nc‘,b×O,ìâŠ\"Ô£r(áf’YÓO-°¤ykËàŽ*&ê‰,kä•yIP\n‘”£rpE%ËÌ`àó89žÌ×…¥lëUN6_‘<EªåédL êK!Ÿ—ÄZbÕkñ*‚ºóq©¢‰C\$ÅÇP®¦ÍòäªsHnIÈMÙ(ˆ¯ƒq…ÄD@\"8÷¡\nƒâr–f—èC\rP€pKƣ஛Îd–L!Nˆ¸R9¨úcl…i½!a :ÂÒ\rÄ\rPSS—ã„*„…Ì0a ¦,–бd4Q\r3v†¹ì±LˆøÇʘÁðGn\"3ñ%QdŸµð‰)¯i4Ñu•sÁLjXÁMP¬‚^«ä5¹O’¥ bépé xyèðÉTqDnBy®CàlÐq\0X“°2ŒE% dF…‚,7G‹á±& µâRi¨Ž„#瀉CV¨ÆNÀÚ\$¢LB!(<€„*1|H\"Eu<ÜãªP0T|sé¾)C(oZ[ÒµSœt»îýùú¢²m•\nnƒð â•à6<ñ›/> ›â}Sð8=ã‚ÇÀàô/™)BÑvEIÊbœvð’¬–/ˆªŠqìãÂôe¿KšÔw\0%õ!Í€pªUT@ѵ‰Ë¦_ŒË˜@òàtË8î%ñ>âÌôA´—¤äb+~+\n’…ΤÅ\"©>4Áˆc^Úô־šè§N€ZÛ^ÖØ¯N4ªCDr– DÉCÑ’øàáȳö(ÅR˜ed±‰ù¦›{áŠF•Z†+Q#´ÈW-ýí‘¥qÉÑUCÆÎ;£œ‹XðÛx£¤„\n6ÍzkàvÚý´qàx\"h’ÄšRXþ²?Àpd¢ùÅsðæ†ž?|ÜpÓ\rˆã¿~ÒÖ^ƘhÖªAñÆ<r\$ÓAfÇ5\n\"0;œƒ”‰!Ç¼Õ aÉá‰ÖzG„¬1ÞBÊ’ãÏ\"…¸†±OLkÛÓ‡‘\0ƒžFõñ¿Ž'YœŽˆ4õИ");}elseif($_GET["file"]=="jush.js"){header("Content-Type: text/javascript; charset=utf-8");echo |
||
13 | lzw_decompress(compile_file('','minify_js'));}else{header("Content-Type: image/gif");switch($_GET["file"]){case"plus.gif":echo"GIF89a\0\0\0001îîî\0\0€™™™\0\0\0!ù\0\0\0,\0\0\0\0\0\0!„©ËíMñÌ*)¾oú¯) q•¡eˆµî#ÄòLË\0;";break;case"cross.gif":echo"GIF89a\0\0\0001îîî\0\0€™™™\0\0\0!ù\0\0\0,\0\0\0\0\0\0#„©Ëí#\naÖFo~yÃ._wa”á1ç±JîGÂL×6]\0\0;";break;case"up.gif":echo"GIF89a\0\0\0001îîî\0\0€™™™\0\0\0!ù\0\0\0,\0\0\0\0\0\0 „©ËíMQN\nï}ôža8ŠyšaŶ®\0Çò\0;";break;case"down.gif":echo"GIF89a\0\0\0001îîî\0\0€™™™\0\0\0!ù\0\0\0,\0\0\0\0\0\0 „©ËíMñÌ*)¾[Wþ\\¢ÇL&ٜƶ•\0Çò\0;";break;case"arrow.gif":echo"GIF89a\0\n\0€\0\0€€€ÿÿÿ!ù\0\0\0,\0\0\0\0\0\n\0\0‚i–±‹ž”ªÓ²Þ»\0\0;";break;}}exit;}function |
||
0 ignored issues
–
show
The function
connection() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L13-14) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
14 | connection(){global$f;return$f;}function |
||
0 ignored issues
–
show
The function
adminer() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L14-15) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
15 | adminer(){global$b;return$b;}function |
||
0 ignored issues
–
show
The function
idf_unescape() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L15-17) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
16 | idf_unescape($gc){$uc=substr($gc,-1);return |
||
17 | str_replace($uc.$uc,$uc,substr($gc,1,-1));}function |
||
0 ignored issues
–
show
The function
escape_string() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L17-19) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
18 | escape_string($V){return |
||
19 | substr(q($V),1,-1);}function |
||
0 ignored issues
–
show
The function
number() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L19-21) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
20 | number($V){return |
||
21 | preg_replace('~[^0-9]+~','',$V);}function |
||
0 ignored issues
–
show
The function
remove_slashes() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L21-23) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
22 | remove_slashes($pd,$Hb=false){if(get_magic_quotes_gpc()){while(list($x,$V)=each($pd)){foreach($V |
||
23 | as$w=>$U){unset($pd[$x][$w]);if(is_array($U)){$pd[$x][stripslashes($w)]=$U;$pd[]=&$pd[$x][stripslashes($w)];}else$pd[$x][stripslashes($w)]=($Hb?$U:stripslashes($U));}}}}function |
||
0 ignored issues
–
show
The function
bracket_escape() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L23-25) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
24 | bracket_escape($gc,$ua=false){static$re=array(':'=>':1',']'=>':2','['=>':3');return |
||
25 | strtr($gc,($ua?array_flip($re):$re));}function |
||
0 ignored issues
–
show
The function
charset() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L25-26) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
26 | charset($f){return(version_compare($f->server_info,"5.5.3")>=0?"utf8mb4":"utf8");}function |
||
0 ignored issues
–
show
The function
h() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L26-28) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
27 | h($Q){return |
||
28 | str_replace("\0","�",htmlspecialchars($Q,ENT_QUOTES,'utf-8'));}function |
||
0 ignored issues
–
show
The function
nbsp() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L28-29) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
29 | nbsp($Q){return(trim($Q)!=""?h($Q):" ");}function |
||
0 ignored issues
–
show
The function
nl_br() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L29-31) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
30 | nl_br($Q){return |
||
31 | str_replace("\n","<br>",$Q);}function |
||
0 ignored issues
–
show
The function
checkbox() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L31-32) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
32 | checkbox($D,$W,$Fa,$sc="",$Tc="",$Ia=""){$K="<input type='checkbox' name='$D' value='".h($W)."'".($Fa?" checked":"").($Tc?' onclick="'.h($Tc).'"':'').">";return($sc!=""||$Ia?"<label".($Ia?" class='$Ia'":"").">$K".h($sc)."</label>":$K);}function |
||
0 ignored issues
–
show
The function
optionlist() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L32-35) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
33 | optionlist($Xc,$Id=null,$Fe=false){$K="";foreach($Xc |
||
34 | as$w=>$U){$Yc=array($w=>$U);if(is_array($U)){$K.='<optgroup label="'.h($w).'">';$Yc=$U;}foreach($Yc |
||
35 | as$x=>$V)$K.='<option'.($Fe||is_string($x)?' value="'.h($x).'"':'').(($Fe||is_string($x)?(string)$x:$V)===$Id?' selected':'').'>'.h($V);if(is_array($U))$K.='</optgroup>';}return$K;}function |
||
0 ignored issues
–
show
The function
html_select() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L35-37) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
36 | View Code Duplication | html_select($D,$Xc,$W="",$Sc=true){if($Sc)return"<select name='".h($D)."'".(is_string($Sc)?' onchange="'.h($Sc).'"':"").">".optionlist($Xc,$W)."</select>";$K="";foreach($Xc |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
37 | as$x=>$V)$K.="<label><input type='radio' name='".h($D)."' value='".h($x)."'".($x==$W?" checked":"").">".h($V)."</label>";return$K;}function |
||
0 ignored issues
–
show
The function
select_input() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L37-38) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
38 | select_input($c,$Xc,$W="",$hd=""){return($Xc?"<select$c><option value=''>$hd".optionlist($Xc,$W,true)."</select>":"<input$c size='10' value='".h($W)."' placeholder='$hd'>");}function |
||
0 ignored issues
–
show
The function
confirm() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L38-39) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
39 | confirm(){return" onclick=\"return confirm('".'Are you sure?'."');\"";}function |
||
0 ignored issues
–
show
The function
print_fieldset() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L39-40) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
40 | print_fieldset($r,$wc,$Je=false,$Tc=""){echo"<fieldset><legend><a href='#fieldset-$r' onclick=\"".h($Tc)."return !toggle('fieldset-$r');\">$wc</a></legend><div id='fieldset-$r'".($Je?"":" class='hidden'").">\n";}function |
||
0 ignored issues
–
show
The function
bold() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L40-41) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
41 | bold($Aa,$Ia=""){return($Aa?" class='active $Ia'":($Ia?" class='$Ia'":""));}function |
||
0 ignored issues
–
show
The function
odd() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L41-42) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
42 | odd($K=' class="odd"'){static$q=0;if(!$K)$q=-1;return($q++%2?$K:'');}function |
||
0 ignored issues
–
show
The function
js_escape() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L42-44) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
43 | js_escape($Q){return |
||
44 | addcslashes($Q,"\r\n'\\/");}function |
||
0 ignored issues
–
show
The function
json_row() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L44-45) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
45 | json_row($x,$V=null){static$Ib=true;if($Ib)echo"{";if($x!=""){echo($Ib?"":",")."\n\t\"".addcslashes($x,"\r\n\"\\/").'": '.($V!==null?'"'.addcslashes($V,"\r\n\"\\/").'"':'undefined');$Ib=false;}else{echo"\n}\n";$Ib=true;}}function |
||
0 ignored issues
–
show
The function
ini_bool() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L45-46) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
46 | ini_bool($kc){$V=ini_get($kc);return(preg_match('~^(on|true|yes)$~i',$V)||(int)$V);}function |
||
0 ignored issues
–
show
The function
sid() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L46-47) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
47 | sid(){static$K;if($K===null)$K=(SID&&!($_COOKIE&&ini_bool("session.use_cookies")));return$K;}function |
||
0 ignored issues
–
show
The function
set_password() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L47-48) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
48 | set_password($X,$O,$T,$G){$_SESSION["pwds"][$X][$O][$T]=($_COOKIE["adminer_key"]&&is_string($G)?array(encrypt_string($G,$_COOKIE["adminer_key"])):$G);}function |
||
0 ignored issues
–
show
The function
get_password() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L48-49) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
49 | get_password(){$K=get_session("pwds");if(is_array($K))$K=($_COOKIE["adminer_key"]?decrypt_string($K[0],$_COOKIE["adminer_key"]):false);return$K;}function |
||
0 ignored issues
–
show
The function
q() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L49-50) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
50 | q($Q){global$f;return$f->quote($Q);}function |
||
0 ignored issues
–
show
The function
get_vals() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L50-51) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
51 | get_vals($I,$d=0){global$f;$K=array();$J=$f->query($I);if(is_object($J)){while($L=$J->fetch_row())$K[]=$L[$d];}return$K;}function |
||
0 ignored issues
–
show
The function
get_key_vals() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L51-52) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
52 | get_key_vals($I,$g=null,$ke=0){global$f;if(!is_object($g))$g=$f;$K=array();$g->timeout=$ke;$J=$g->query($I);$g->timeout=0;if(is_object($J)){while($L=$J->fetch_row())$K[$L[0]]=$L[1];}return$K;}function |
||
0 ignored issues
–
show
The function
get_rows() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L52-53) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
53 | View Code Duplication | get_rows($I,$g=null,$k="<p class='error'>"){global$f;$Sa=(is_object($g)?$g:$f);$K=array();$J=$Sa->query($I);if(is_object($J)){while($L=$J->fetch_assoc())$K[]=$L;}elseif(!$J&&!is_object($g)&&$k&&defined("PAGE_HEADER"))echo$k.error()."\n";return$K;}function |
|
0 ignored issues
–
show
The function
unique_array() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L53-56) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
54 | unique_array($L,$t){foreach($t |
||
55 | as$s){if(preg_match("~PRIMARY|UNIQUE~",$s["type"])){$K=array();foreach($s["columns"]as$x){if(!isset($L[$x]))continue |
||
56 | 2;$K[$x]=$L[$x];}return$K;}}}function |
||
0 ignored issues
–
show
The function
escape_key() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L56-58) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
57 | escape_key($x){if(preg_match('(^([\w(]+)('.str_replace("_",".*",preg_quote(idf_escape("_"))).')([ \w)]+)$)',$x,$A))return$A[1].idf_escape(idf_unescape($A[2])).$A[3];return |
||
58 | idf_escape($x);}function |
||
0 ignored issues
–
show
The function
where() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L58-60) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
59 | View Code Duplication | where($Y,$m=array()){global$f,$v;$K=array();foreach((array)$Y["where"]as$x=>$V){$x=bracket_escape($x,1);$d=escape_key($x);$K[]=$d.(($v=="sql"&&preg_match('~^[0-9]*\\.[0-9]*$~',$V))||$v=="mssql"?" LIKE ".q(addcslashes($V,"%_\\")):" = ".unconvert_field($m[$x],q($V)));if($v=="sql"&&preg_match('~char|text~',$m[$x]["type"])&&preg_match("~[^ -@]~",$V))$K[]="$d = ".q($V)." COLLATE ".charset($f)."_bin";}foreach((array)$Y["null"]as$x)$K[]=escape_key($x)." IS NULL";return |
|
0 ignored issues
–
show
1 is of type integer , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
60 | implode(" AND ",$K);}function |
||
0 ignored issues
–
show
The function
where_check() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L60-62) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
61 | where_check($V,$m=array()){parse_str($V,$Ea);remove_slashes(array(&$Ea));return |
||
62 | where($Ea,$m);}function |
||
0 ignored issues
–
show
The function
where_link() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L62-63) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
63 | where_link($q,$d,$W,$Vc="="){return"&where%5B$q%5D%5Bcol%5D=".urlencode($d)."&where%5B$q%5D%5Bop%5D=".urlencode(($W!==null?$Vc:"IS NULL"))."&where%5B$q%5D%5Bval%5D=".urlencode($W);}function |
||
0 ignored issues
–
show
The function
convert_fields() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L63-65) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
64 | View Code Duplication | convert_fields($e,$m,$N=array()){$K="";foreach($e |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
65 | as$x=>$V){if($N&&!in_array(idf_escape($x),$N))continue;$oa=convert_field($m[$x]);if($oa)$K.=", $oa AS ".idf_escape($x);}return$K;}function |
||
0 ignored issues
–
show
The function
cookie() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L65-67) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() The expression
$N of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$oa of type string|null is loosely compared to true ; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.
In PHP, under loose comparison (like For '' == false // true
'' == null // true
'ab' == false // false
'ab' == null // false
// It is often better to use strict comparison
'' === false // false
'' === null // false
![]() |
|||
66 | cookie($D,$W,$zc=2592000){global$aa;$ed=array($D,(preg_match("~\n~",$W)?"":$W),($zc?time()+$zc:0),preg_replace('~\\?.*~','',$_SERVER["REQUEST_URI"]),"",$aa);if(version_compare(PHP_VERSION,'5.2.0')>=0)$ed[]=true;return |
||
67 | call_user_func_array('setcookie',$ed);}function |
||
0 ignored issues
–
show
The function
restart_session() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L67-68) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
68 | restart_session(){if(!ini_bool("session.use_cookies"))session_start();}function |
||
0 ignored issues
–
show
The function
stop_session() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L68-69) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
69 | stop_session(){if(!ini_bool("session.use_cookies"))session_write_close();}function&get_session($x){return$_SESSION[$x][DRIVER][SERVER][$_GET["username"]];}function |
||
0 ignored issues
–
show
The function
get_session() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L69-69) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() The function
set_session() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L69-70) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
70 | set_session($x,$V){$_SESSION[$x][DRIVER][SERVER][$_GET["username"]]=$V;}function |
||
0 ignored issues
–
show
The function
auth_url() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L70-71) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
71 | auth_url($X,$O,$T,$h=null){global$jb;preg_match('~([^?]*)\\??(.*)~',remove_from_uri(implode("|",array_keys($jb))."|username|".($h!==null?"db|":"").session_name()),$A);return"$A[1]?".(sid()?SID."&":"").($X!="server"||$O!=""?urlencode($X)."=".urlencode($O)."&":"")."username=".urlencode($T).($h!=""?"&db=".urlencode($h):"").($A[2]?"&$A[2]":"");}function |
||
0 ignored issues
–
show
The function
is_ajax() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L71-72) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
72 | is_ajax(){return($_SERVER["HTTP_X_REQUESTED_WITH"]=="XMLHttpRequest");}function |
||
0 ignored issues
–
show
The function
redirect() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L72-73) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
73 | View Code Duplication | redirect($_,$B=null){if($B!==null){restart_session();$_SESSION["messages"][preg_replace('~^[^?]*~','',($_!==null?$_:$_SERVER["REQUEST_URI"]))][]=$B;}if($_!==null){if($_=="")$_=".";header("Location: $_");exit;}}function |
|
0 ignored issues
–
show
The function
query_redirect() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L73-76) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This function seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
74 | query_redirect($I,$_,$B,$xd=true,$zb=true,$Bb=false,$je=""){global$f,$k,$b;if($zb){$Td=microtime(true);$Bb=!$f->query($I);$je=format_time($Td);}$Sd="";if($I)$Sd=$b->messageQuery($I,$je);if($Bb){$k=error().$Sd;return |
||
75 | false;}if($xd)redirect($_,$B.$Sd);return |
||
76 | true;}function |
||
0 ignored issues
–
show
The function
queries() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L76-78) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
77 | queries($I){global$f;static$sd=array();static$Td;if(!$Td)$Td=microtime(true);if($I===null)return |
||
78 | array(implode("\n",$sd),format_time($Td));$sd[]=(preg_match('~;$~',$I)?"DELIMITER ;;\n$I;\nDELIMITER ":$I).";";return$f->query($I);}function |
||
0 ignored issues
–
show
The function
apply_queries() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L78-82) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
79 | apply_queries($I,$ee,$wb='table'){foreach($ee |
||
80 | as$R){if(!queries("$I ".$wb($R)))return |
||
81 | false;}return |
||
82 | true;}function |
||
0 ignored issues
–
show
The function
queries_redirect() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L82-84) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
83 | queries_redirect($_,$B,$xd){list($sd,$je)=queries(null);return |
||
84 | query_redirect($sd,$_,$B,$xd,false,!$xd,$je);}function |
||
0 ignored issues
–
show
The function
format_time() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L84-86) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
85 | format_time($Td){return |
||
86 | sprintf('%.3f s',max(0,microtime(true)-$Td));}function |
||
0 ignored issues
–
show
The function
remove_from_uri() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L86-88) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
87 | remove_from_uri($dd=""){return |
||
88 | substr(preg_replace("~(?<=[?&])($dd".(SID?"":"|".session_name()).")=[^&]*&~",'',"$_SERVER[REQUEST_URI]&"),0,-1);}function |
||
0 ignored issues
–
show
The function
pagination() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L88-89) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
89 | View Code Duplication | pagination($F,$Ya){return" ".($F==$Ya?$F+1:'<a href="'.h(remove_from_uri("page").($F?"&page=$F".($_GET["next"]?"&next=".urlencode($_GET["next"]):""):"")).'">'.($F+1)."</a>");}function |
|
0 ignored issues
–
show
The function
get_file() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L89-92) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This function seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
90 | get_file($x,$bb=false){$Eb=$_FILES[$x];if(!$Eb)return |
||
91 | null;foreach($Eb |
||
92 | as$x=>$V)$Eb[$x]=(array)$V;$K='';foreach($Eb["error"]as$x=>$k){if($k)return$k;$D=$Eb["name"][$x];$pe=$Eb["tmp_name"][$x];$Ta=file_get_contents($bb&&preg_match('~\\.gz$~',$D)?"compress.zlib://$pe":$pe);if($bb){$Td=substr($Ta,0,3);if(function_exists("iconv")&&preg_match("~^\xFE\xFF|^\xFF\xFE~",$Td,$yd))$Ta=iconv("utf-16","utf-8",$Ta);elseif($Td=="\xEF\xBB\xBF")$Ta=substr($Ta,3);$K.=$Ta."\n\n";}else$K.=$Ta;}return$K;}function |
||
0 ignored issues
–
show
The function
upload_error() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L92-93) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
93 | upload_error($k){$Ec=($k==UPLOAD_ERR_INI_SIZE?ini_get("upload_max_filesize"):0);return($k?'Unable to upload a file.'.($Ec?" ".sprintf('Maximum allowed file size is %sB.',$Ec):""):'File does not exist.');}function |
||
0 ignored issues
–
show
The function
repeat_pattern() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L93-95) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
94 | repeat_pattern($H,$xc){return |
||
95 | str_repeat("$H{0,65535}",$xc/65535)."$H{0,".($xc%65535)."}";}function |
||
0 ignored issues
–
show
The function
is_utf8() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L95-96) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
96 | is_utf8($V){return(preg_match('~~u',$V)&&!preg_match('~[\\0-\\x8\\xB\\xC\\xE-\\x1F]~',$V));}function |
||
0 ignored issues
–
show
The function
shorten_utf8() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L96-98) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
97 | shorten_utf8($Q,$xc=80,$Zd=""){if(!preg_match("(^(".repeat_pattern("[\t\r\n -\x{FFFF}]",$xc).")($)?)u",$Q,$A))preg_match("(^(".repeat_pattern("[\t\r\n -~]",$xc).")($)?)",$Q,$A);return |
||
98 | h($A[1]).$Zd.(isset($A[2])?"":"<i>...</i>");}function |
||
0 ignored issues
–
show
The function
format_number() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L98-100) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
99 | format_number($V){return |
||
100 | strtr(number_format($V,0,".",','),preg_split('~~u','0123456789',-1,PREG_SPLIT_NO_EMPTY));}function |
||
0 ignored issues
–
show
The function
friendly_url() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L100-102) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
101 | friendly_url($V){return |
||
102 | preg_replace('~[^a-z0-9_]~i','-',$V);}function |
||
0 ignored issues
–
show
The function
hidden_fields() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L102-105) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
103 | hidden_fields($pd,$ic=array()){while(list($x,$V)=each($pd)){if(!in_array($x,$ic)){if(is_array($V)){foreach($V |
||
104 | as$w=>$U)$pd[$x."[$w]"]=$U;}else |
||
105 | echo'<input type="hidden" name="'.h($x).'" value="'.h($V).'">';}}}function |
||
0 ignored issues
–
show
The function
hidden_fields_get() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L105-106) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
106 | hidden_fields_get(){echo(sid()?'<input type="hidden" name="'.session_name().'" value="'.h(session_id()).'">':''),(SERVER!==null?'<input type="hidden" name="'.DRIVER.'" value="'.h(SERVER).'">':""),'<input type="hidden" name="username" value="'.h($_GET["username"]).'">';}function |
||
0 ignored issues
–
show
The function
table_status1() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L106-107) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
107 | table_status1($R,$Cb=false){$K=table_status($R,$Cb);return($K?$K:array("Name"=>$R));}function |
||
0 ignored issues
–
show
The function
column_foreign_keys() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L107-108) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
108 | column_foreign_keys($R){global$b;$K=array();foreach($b->foreignKeys($R)as$Nb){foreach($Nb["source"]as$V)$K[$V][]=$Nb;}return$K;}function |
||
0 ignored issues
–
show
The function
enum_input() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L108-109) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
109 | View Code Duplication | enum_input($ue,$c,$l,$W,$sb=null){global$b;preg_match_all("~'((?:[^']|'')*)'~",$l["length"],$Bc);$K=($sb!==null?"<label><input type='$ue'$c value='$sb'".((is_array($W)?in_array($sb,$W):$W===0)?" checked":"")."><i>".'empty'."</i></label>":"");foreach($Bc[1]as$q=>$V){$V=stripcslashes(str_replace("''","'",$V));$Fa=(is_int($W)?$W==$q+1:(is_array($W)?in_array($q+1,$W):$W===$V));$K.=" <label><input type='$ue'$c value='".($q+1)."'".($Fa?' checked':'').'>'.h($b->editVal($V,$l)).'</label>';}return$K;}function |
|
0 ignored issues
–
show
The function
input() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L109-112) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This function seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
110 | input($l,$W,$o){global$f,$we,$b,$v;$D=h(bracket_escape($l["field"]));echo"<td class='function'>";if(is_array($W)&&!$o){$na=array($W);if(version_compare(PHP_VERSION,5.4)>=0)$na[]=JSON_PRETTY_PRINT;$W=call_user_func_array('json_encode',$na);$o="json";}$Ad=($v=="mssql"&&$l["auto_increment"]);if($Ad&&!$_POST["save"])$o=null;$Tb=(isset($_GET["select"])||$Ad?array("orig"=>'original'):array())+$b->editFunctions($l);$c=" name='fields[$D]'";if($l["type"]=="enum")echo |
||
111 | nbsp($Tb[""])."<td>".$b->editInput($_GET["edit"],$l,$c,$W);else{$Ib=0;foreach($Tb |
||
112 | as$x=>$V){if($x===""||!$V)break;$Ib++;}$Sc=($Ib?" onchange=\"var f = this.form['function[".h(js_escape(bracket_escape($l["field"])))."]']; if ($Ib > f.selectedIndex) f.selectedIndex = $Ib;\" onkeyup='keyupChange.call(this);'":"");$c.=$Sc;$Yb=(in_array($o,$Tb)||isset($Tb[$o]));echo(count($Tb)>1?"<select name='function[$D]' onchange='functionChange(this);'".on_help("getTarget(event).value.replace(/^SQL\$/, '')",1).">".optionlist($Tb,$o===null||$Yb?$o:"")."</select>":nbsp(reset($Tb))).'<td>';$mc=$b->editInput($_GET["edit"],$l,$c,$W);if($mc!="")echo$mc;elseif($l["type"]=="set"){preg_match_all("~'((?:[^']|'')*)'~",$l["length"],$Bc);foreach($Bc[1]as$q=>$V){$V=stripcslashes(str_replace("''","'",$V));$Fa=(is_int($W)?($W>>$q)&1:in_array($V,explode(",",$W),true));echo" <label><input type='checkbox' name='fields[$D][$q]' value='".(1<<$q)."'".($Fa?' checked':'')."$Sc>".h($b->editVal($V,$l)).'</label>';}}elseif(preg_match('~blob|bytea|raw|file~',$l["type"])&&ini_bool("file_uploads"))echo"<input type='file' name='fields-$D'$Sc>";elseif(($ge=preg_match('~text|lob~',$l["type"]))||preg_match("~\n~",$W)){if($ge&&$v!="sqlite")$c.=" cols='50' rows='12'";else{$M=min(12,substr_count($W,"\n")+1);$c.=" cols='30' rows='$M'".($M==1?" style='height: 1.2em;'":"");}echo"<textarea$c>".h($W).'</textarea>';}elseif($o=="json")echo"<textarea$c cols='50' rows='12' class='jush-js'>".h($W).'</textarea>';else{$Gc=(!preg_match('~int~',$l["type"])&&preg_match('~^(\\d+)(,(\\d+))?$~',$l["length"],$A)?((preg_match("~binary~",$l["type"])?2:1)*$A[1]+($A[3]?1:0)+($A[2]&&!$l["unsigned"]?1:0)):($we[$l["type"]]?$we[$l["type"]]+($l["unsigned"]?0:1):0));if($v=='sql'&&$f->server_info>=5.6&&preg_match('~time~',$l["type"]))$Gc+=7;echo"<input".((!$Yb||$o==="")&&preg_match('~(?<!o)int~',$l["type"])?" type='number'":"")." value='".h($W)."'".($Gc?" maxlength='$Gc'":"").(preg_match('~char|binary~',$l["type"])&&$Gc>20?" size='40'":"")."$c>";}}}function |
||
0 ignored issues
–
show
The function
process_input() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L112-119) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() The variable
$A does not seem to be defined for all execution paths leading up to this point.
If you define a variable conditionally, it can happen that it is not defined for all execution paths. Let’s take a look at an example: function myFunction($a) {
switch ($a) {
case 'foo':
$x = 1;
break;
case 'bar':
$x = 2;
break;
}
// $x is potentially undefined here.
echo $x;
}
In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined. Available Fixes
![]() |
|||
113 | process_input($l){global$b;$gc=bracket_escape($l["field"]);$o=$_POST["function"][$gc];$W=$_POST["fields"][$gc];if($l["type"]=="enum"){if($W==-1)return |
||
114 | false;if($W=="")return"NULL";return+$W;}if($l["auto_increment"]&&$W=="")return |
||
115 | null;if($o=="orig")return($l["on_update"]=="CURRENT_TIMESTAMP"?idf_escape($l["field"]):false);if($o=="NULL")return"NULL";if($l["type"]=="set")return |
||
116 | array_sum((array)$W);if($o=="json"){$o="";$W=json_decode($W,true);if(!is_array($W))return |
||
0 ignored issues
–
show
$o is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
117 | false;return$W;}if(preg_match('~blob|bytea|raw|file~',$l["type"])&&ini_bool("file_uploads")){$Eb=get_file("fields-$gc");if(!is_string($Eb))return |
||
118 | false;return |
||
119 | q($Eb);}return$b->processInput($l,$W,$o);}function |
||
0 ignored issues
–
show
The function
fields_from_edit() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L119-120) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
120 | fields_from_edit(){global$i;$K=array();foreach((array)$_POST["field_keys"]as$x=>$V){if($V!=""){$V=bracket_escape($V);$_POST["function"][$V]=$_POST["field_funs"][$x];$_POST["fields"][$V]=$_POST["field_vals"][$x];}}foreach((array)$_POST["fields"]as$x=>$V){$D=bracket_escape($x,1);$K[$D]=array("field"=>$D,"privileges"=>array("insert"=>1,"update"=>1),"null"=>1,"auto_increment"=>($x==$i->primary),);}return$K;}function |
||
0 ignored issues
–
show
The function
search_tables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L120-121) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() 1 is of type integer , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() |
|||
121 | View Code Duplication | search_tables(){global$b,$f;$_GET["where"][0]["op"]="LIKE %%";$_GET["where"][0]["val"]=$_POST["query"];$Qb=false;foreach(table_status('',true)as$R=>$S){$D=$b->tableName($S);if(isset($S["Engine"])&&$D!=""&&(!$_POST["tables"]||in_array($R,$_POST["tables"]))){$J=$f->query("SELECT".limit("1 FROM ".table($R)," WHERE ".implode(" AND ",$b->selectSearchProcess(fields($R),array())),1));if(!$J||$J->fetch_row()){if(!$Qb){echo"<ul>\n";$Qb=true;}echo"<li>".($J?"<a href='".h(ME."select=".urlencode($R)."&where[0][op]=".urlencode($_GET["where"][0]["op"])."&where[0][val]=".urlencode($_GET["where"][0]["val"]))."'>$D</a>\n":"$D: <span class='error'>".error()."</span>\n");}}}echo($Qb?"</ul>":"<p class='message'>".'No tables.')."\n";}function |
|
0 ignored issues
–
show
The function
dump_headers() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L121-122) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
122 | dump_headers($fc,$Jc=false){global$b;$K=$b->dumpHeaders($fc,$Jc);$bd=$_POST["output"];if($bd!="text")header("Content-Disposition: attachment; filename=".$b->dumpFilename($fc).".$K".($bd!="file"&&!preg_match('~[^0-9a-z]~',$bd)?".$bd":""));session_write_close();ob_flush();flush();return$K;}function |
||
0 ignored issues
–
show
The function
dump_csv() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L122-125) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
123 | dump_csv($L){foreach($L |
||
124 | as$x=>$V){if(preg_match("~[\"\n,;\t]~",$V)||$V==="")$L[$x]='"'.str_replace('"','""',$V).'"';}echo |
||
125 | implode(($_POST["format"]=="csv"?",":($_POST["format"]=="tsv"?"\t":";")),$L)."\r\n";}function |
||
0 ignored issues
–
show
The function
apply_sql_function() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L125-126) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
126 | apply_sql_function($o,$d){return($o?($o=="unixepoch"?"DATETIME($d, '$o')":($o=="count distinct"?"COUNT(DISTINCT ":strtoupper("$o("))."$d)"):$d);}function |
||
0 ignored issues
–
show
The function
get_temp_dir() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L126-128) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
127 | View Code Duplication | get_temp_dir(){$K=ini_get("upload_tmp_dir");if(!$K){if(function_exists('sys_get_temp_dir'))$K=sys_get_temp_dir();else{$Fb=@tempnam("","");if(!$Fb)return |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
128 | false;$K=dirname($Fb);unlink($Fb);}}return$K;}function |
||
0 ignored issues
–
show
The function
password_file() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L128-129) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
129 | password_file($Va){$Fb=get_temp_dir()."/adminer.key";$K=@file_get_contents($Fb);if($K||!$Va)return$K;$Rb=@fopen($Fb,"w");if($Rb){chmod($Fb,0660);$K=rand_string();fwrite($Rb,$K);fclose($Rb);}return$K;}function |
||
0 ignored issues
–
show
The function
rand_string() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L129-131) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
130 | rand_string(){return |
||
131 | md5(uniqid(mt_rand(),true));}function |
||
0 ignored issues
–
show
The function
select_value() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L131-133) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
132 | select_value($V,$z,$l,$he){global$b,$aa;if(is_array($V)){$K="";foreach($V |
||
133 | as$w=>$U)$K.="<tr>".($V!=array_values($V)?"<th>".h($w):"")."<td>".select_value($U,$z,$l,$he);return"<table cellspacing='0'>$K</table>";}if(!$z)$z=$b->selectLink($V,$l);if($z===null){if(is_mail($V))$z="mailto:$V";if($qd=is_url($V))$z=(($qd=="http"&&$aa)||preg_match('~WebKit~i',$_SERVER["HTTP_USER_AGENT"])?$V:"https://www.adminer.org/redirect/?url=".urlencode($V));}$K=$b->editVal($V,$l);if($K!==null){if($K==="")$K=" ";elseif(!is_utf8($K))$K="\0";elseif($he!=""&&is_shortable($l))$K=shorten_utf8($K,max(0,+$he));else$K=h($K);}return$b->selectVal($K,$z,$l,$V);}function |
||
0 ignored issues
–
show
The function
is_mail() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L133-135) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
134 | is_mail($pb){$pa='[-a-z0-9!#$%&\'*+/=?^_`{|}~]';$ib='[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])';$H="$pa+(\\.$pa+)*@($ib?\\.)+$ib";return |
||
135 | is_string($pb)&&preg_match("(^$H(,\\s*$H)*\$)i",$pb);}function |
||
0 ignored issues
–
show
The function
is_url() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L135-136) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
136 | is_url($Q){$ib='[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])';return(preg_match("~^(https?)://($ib?\\.)+$ib(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i",$Q,$A)?strtolower($A[1]):"");}function |
||
0 ignored issues
–
show
The function
is_shortable() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L136-138) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
137 | is_shortable($l){return |
||
138 | preg_match('~char|text|lob|geometry|point|linestring|polygon|string~',$l["type"]);}function |
||
0 ignored issues
–
show
The function
count_rows() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L138-139) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
139 | count_rows($R,$Y,$u,$p){global$v;$I=" FROM ".table($R).($Y?" WHERE ".implode(" AND ",$Y):"");return($u&&($v=="sql"||count($p)==1)?"SELECT COUNT(DISTINCT ".implode(", ",$p).")$I":"SELECT COUNT(*)".($u?" FROM (SELECT 1$I$Ub) x":$I));}function |
||
0 ignored issues
–
show
The function
slow_query() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L139-147) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
140 | slow_query($I){global$b,$qe;$h=$b->database();$ke=$b->queryTimeout();if(support("kill")&&is_object($g=connect())&&($h==""||$g->select_db($h))){$rc=$g->result("SELECT CONNECTION_ID()");echo'<script type="text/javascript"> |
||
141 | var timeout = setTimeout(function () { |
||
142 | ajax(\'',js_escape(ME),'script=kill\', function () { |
||
143 | }, \'token=',$qe,'&kill=',$rc,'\'); |
||
144 | }, ',1000*$ke,'); |
||
145 | </script> |
||
146 | ';}else$g=null;ob_flush();flush();$K=@get_key_vals($I,$g,$ke);if($g){echo"<script type='text/javascript'>clearTimeout(timeout);</script>\n";ob_flush();flush();}return |
||
147 | array_keys($K);}function |
||
0 ignored issues
–
show
The function
get_token() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L147-148) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
148 | get_token(){$vd=rand(1,1e6);return($vd^$_SESSION["token"]).":$vd";}function |
||
0 ignored issues
–
show
The function
verify_token() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L148-149) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
149 | verify_token(){list($qe,$vd)=explode(":",$_POST["token"]);return($vd^$_SESSION["token"])==$qe;}function |
||
0 ignored issues
–
show
The function
lzw_decompress() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L149-151) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
150 | lzw_decompress($za){$gb=256;$_a=8;$Ka=array();$Bd=0;$Cd=0;for($q=0;$q<strlen($za);$q++){$Bd=($Bd<<8)+ord($za[$q]);$Cd+=8;if($Cd>=$_a){$Cd-=$_a;$Ka[]=$Bd>>$Cd;$Bd&=(1<<$Cd)-1;$gb++;if($gb>>$_a)$_a++;}}$fb=range("\0","\xFF");$K="";foreach($Ka |
||
151 | as$q=>$Ja){$ob=$fb[$Ja];if(!isset($ob))$ob=$Ne.$Ne[0];$K.=$ob;if($q)$fb[]=$Ne.$ob[0];$Ne=$ob;}return$K;}function |
||
0 ignored issues
–
show
The function
on_help() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L151-152) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() The variable
$Ne does not seem to be defined for all execution paths leading up to this point.
If you define a variable conditionally, it can happen that it is not defined for all execution paths. Let’s take a look at an example: function myFunction($a) {
switch ($a) {
case 'foo':
$x = 1;
break;
case 'bar':
$x = 2;
break;
}
// $x is potentially undefined here.
echo $x;
}
In the above example, the variable $x is defined if you pass “foo” or “bar” as argument for $a. However, since the switch statement has no default case statement, if you pass any other value, the variable $x would be undefined. Available Fixes
![]() |
|||
152 | View Code Duplication | on_help($Pa,$Pd=0){return" onmouseover='helpMouseover(this, event, ".h($Pa).", $Pd);' onmouseout='helpMouseout(this, event);'";}function |
|
0 ignored issues
–
show
The function
edit_form() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L152-159) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This function seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
153 | edit_form($a,$m,$L,$De){global$b,$v,$qe,$k;$de=$b->tableName(table_status1($a,true));page_header(($De?'Edit':'Insert'),$k,array("select"=>array($a,$de)),$de);if($L===false)echo"<p class='error'>".'No rows.'."\n";echo'<form action="" method="post" enctype="multipart/form-data" id="form"> |
||
154 | ';if(!$m)echo"<p class='error'>".'You have no privileges to update this table.'."\n";else{echo"<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";foreach($m |
||
155 | as$D=>$l){echo"<tr><th>".$b->fieldName($l);$cb=$_GET["set"][bracket_escape($D)];if($cb===null){$cb=$l["default"];if($l["type"]=="bit"&&preg_match("~^b'([01]*)'\$~",$cb,$yd))$cb=$yd[1];}$W=($L!==null?($L[$D]!=""&&$v=="sql"&&preg_match("~enum|set~",$l["type"])?(is_array($L[$D])?array_sum($L[$D]):+$L[$D]):$L[$D]):(!$De&&$l["auto_increment"]?"":(isset($_GET["select"])?false:$cb)));if(!$_POST["save"]&&is_string($W))$W=$b->editVal($W,$l);$o=($_POST["save"]?(string)$_POST["function"][$D]:($De&&$l["on_update"]=="CURRENT_TIMESTAMP"?"now":($W===false?null:($W!==null?'':'NULL'))));if(preg_match("~time~",$l["type"])&&$W=="CURRENT_TIMESTAMP"){$W="";$o="now";}input($l,$W,$o);echo"\n";}if(!support("table"))echo"<tr>"."<th><input name='field_keys[]' onkeyup='keyupChange.call(this);' onchange='fieldChange(this);' value=''>"."<td class='function'>".html_select("field_funs[]",$b->editFunctions(array("null"=>isset($_GET["select"]))))."<td><input name='field_vals[]'>"."\n";echo"</table>\n";}echo"<p>\n";if($m){echo"<input type='submit' value='".'Save'."'>\n";if(!isset($_GET["select"]))echo"<input type='submit' name='insert' value='".($De?'Save and continue edit'."' onclick='return !ajaxForm(this.form, \"".'Saving'.'...", this)':'Save and insert next')."' title='Ctrl+Shift+Enter'>\n";}echo($De?"<input type='submit' name='delete' value='".'Delete'."'".confirm().">\n":($_POST||!$m?"":"<script type='text/javascript'>focus(document.getElementById('form').getElementsByTagName('td')[1].firstChild);</script>\n"));if(isset($_GET["select"]))hidden_fields(array("check"=>(array)$_POST["check"],"clone"=>$_POST["clone"],"all"=>$_POST["all"]));echo'<input type="hidden" name="referer" value="',h(isset($_POST["referer"])?$_POST["referer"]:$_SERVER["HTTP_REFERER"]),'"> |
||
156 | <input type="hidden" name="save" value="1"> |
||
157 | <input type="hidden" name="token" value="',$qe,'"> |
||
158 | </form> |
||
159 | ';}global$b,$f,$jb,$mb,$ub,$k,$Tb,$Vb,$aa,$lc,$v,$ba,$tc,$Rc,$gd,$Wd,$Zb,$qe,$te,$we,$Ce,$ca;if(!$_SERVER["REQUEST_URI"])$_SERVER["REQUEST_URI"]=$_SERVER["ORIG_PATH_INFO"];if(!strpos($_SERVER["REQUEST_URI"],'?')&&$_SERVER["QUERY_STRING"]!="")$_SERVER["REQUEST_URI"].="?$_SERVER[QUERY_STRING]";$aa=$_SERVER["HTTPS"]&&strcasecmp($_SERVER["HTTPS"],"off");@ini_set("session.use_trans_sid",false);session_cache_limiter("");if(!defined("SID")){session_name("adminer_sid");$ed=array(0,preg_replace('~\\?.*~','',$_SERVER["REQUEST_URI"]),"",$aa);if(version_compare(PHP_VERSION,'5.2.0')>=0)$ed[]=true;call_user_func_array('session_set_cookie_params',$ed);session_start();}remove_slashes(array(&$_GET,&$_POST,&$_COOKIE),$Hb);if(get_magic_quotes_runtime())set_magic_quotes_runtime(false);@set_time_limit(0);@ini_set("zend.ze1_compatibility_mode",false);@ini_set("precision",20);function |
||
0 ignored issues
–
show
The function
get_lang() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L159-160) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly: // For example instead of
@mkdir($dir);
// Better use
if (@mkdir($dir) === false) {
throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
![]() |
|||
160 | get_lang(){return'en';}function |
||
0 ignored issues
–
show
The function
lang() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L160-162) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
161 | lang($se,$Oc=null){if(is_array($se)){$jd=($Oc==1?0:1);$se=$se[$jd];}$se=str_replace("%d","%s",$se);$Oc=format_number($Oc);return |
||
162 | View Code Duplication | sprintf($se,$Oc);}if(extension_loaded('pdo')){class |
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_PDO has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L162-177) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
163 | Min_PDO |
||
164 | extends |
||
165 | PDO{var$_result,$server_info,$affected_rows,$errno,$error;function |
||
0 ignored issues
–
show
|
|||
166 | __construct(){global$b;$jd=array_search("SQL",$b->operators);if($jd!==false)unset($b->operators[$jd]);}function |
||
0 ignored issues
–
show
|
|||
167 | dsn($kb,$T,$G){try{parent::__construct($kb,$T,$G);}catch(Exception$xb){auth_error($xb->getMessage());}$this->setAttribute(13,array('Min_PDOStatement'));$this->server_info=$this->getAttribute(4);}function |
||
0 ignored issues
–
show
It seems like you call parent on a different method (
__construct() instead of dsn() ). Are you sure this is correct? If so, you might want to change this to $this->__construct() .
This check looks for a call to a parent method whose name is different than the method from which it is called. Consider the following code: class Daddy
{
protected function getFirstName()
{
return "Eidur";
}
protected function getSurName()
{
return "Gudjohnsen";
}
}
class Son
{
public function getFirstName()
{
return parent::getSurname();
}
}
The ![]() |
|||
168 | query($I,$xe=false){$J=parent::query($I);$this->error="";if(!$J){list(,$this->errno,$this->error)=$this->errorInfo();return |
||
0 ignored issues
–
show
The return type of
return false; (false ) is incompatible with the return type of the parent method PDO::query of type PDOStatement .
If you return a value from a function or method, it should be a sub-type of the type that is given by the parent type f.e. an interface, or abstract method. This is more formally defined by the Lizkov substitution principle, and guarantees that classes that depend on the parent type can use any instance of a child type interchangably. This principle also belongs to the SOLID principles for object oriented design. Let’s take a look at an example: class Author {
private $name;
public function __construct($name) {
$this->name = $name;
}
public function getName() {
return $this->name;
}
}
abstract class Post {
public function getAuthor() {
return 'Johannes';
}
}
class BlogPost extends Post {
public function getAuthor() {
return new Author('Johannes');
}
}
class ForumPost extends Post { /* ... */ }
function my_function(Post $post) {
echo strtoupper($post->getAuthor());
}
Our function ![]() |
|||
169 | false;}$this->store_result($J);return$J;}function |
||
0 ignored issues
–
show
|
|||
170 | multi_query($I){return$this->_result=$this->query($I);}function |
||
0 ignored issues
–
show
|
|||
171 | store_result($J=null){if(!$J){$J=$this->_result;if(!$J)return |
||
172 | false;}if($J->columnCount()){$J->num_rows=$J->rowCount();return$J;}$this->affected_rows=$J->rowCount();return |
||
173 | true;}function |
||
0 ignored issues
–
show
|
|||
174 | next_result(){if(!$this->_result)return |
||
175 | false;$this->_result->_offset=0;return@$this->_result->nextRowset();}function |
||
0 ignored issues
–
show
The property
_offset does not seem to exist in PDOStatement .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() |
|||
176 | result($I,$l=0){$J=$this->query($I);if(!$J)return |
||
177 | false;$L=$J->fetch();return$L[$l];}}class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_PDOStatement has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L177-183) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
178 | Min_PDOStatement |
||
179 | extends |
||
180 | PDOStatement{var$_offset=0,$num_rows;function |
||
0 ignored issues
–
show
|
|||
181 | fetch_assoc(){return$this->fetch(2);}function |
||
0 ignored issues
–
show
|
|||
182 | fetch_row(){return$this->fetch(3);}function |
||
0 ignored issues
–
show
|
|||
183 | fetch_field(){$L=(object)$this->getColumnMeta($this->_offset++);$L->orgtable=$L->table;$L->orgname=$L->name;$L->charsetnr=(in_array("blob",(array)$L->flags)?63:0);return$L;}}}$jb=array();class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_SQL has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L183-201) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
184 | Min_SQL{var$_conn;function |
||
0 ignored issues
–
show
|
|||
185 | __construct($f){$this->_conn=$f;}function |
||
0 ignored issues
–
show
|
|||
186 | select($R,$N,$Y,$p,$E=array(),$y=1,$F=0,$nd=false){global$b,$v;$u=(count($p)<count($N));$I=$b->selectQueryBuild($N,$Y,$p,$E,$y,$F);if(!$I)$I="SELECT".limit(($_GET["page"]!="last"&&+$y&&$p&&$u&&$v=="sql"?"SQL_CALC_FOUND_ROWS ":"").implode(", ",$N)."\nFROM ".table($R),($Y?"\nWHERE ".implode(" AND ",$Y):"").($p&&$u?"\nGROUP BY ".implode(", ",$p):"").($E?"\nORDER BY ".implode(", ",$E):""),($y!=""?+$y:null),($F?$y*$F:0),"\n");$Td=microtime(true);$K=$this->_conn->query($I);if($nd)echo$b->selectQuery($I,format_time($Td));return$K;}function |
||
0 ignored issues
–
show
|
|||
187 | delete($R,$td,$y=0){$I="FROM ".table($R);return |
||
188 | queries("DELETE".($y?limit1($I,$td):" $I$td"));}function |
||
0 ignored issues
–
show
|
|||
189 | update($R,$P,$td,$y=0,$Kd="\n"){$Ge=array();foreach($P |
||
190 | as$x=>$V)$Ge[]="$x = $V";$I=table($R)." SET$Kd".implode(",$Kd",$Ge);return |
||
191 | queries("UPDATE".($y?limit1($I,$td):" $I$td"));}function |
||
0 ignored issues
–
show
|
|||
192 | insert($R,$P){return |
||
193 | queries("INSERT INTO ".table($R).($P?" (".implode(", ",array_keys($P)).")\nVALUES (".implode(", ",$P).")":" DEFAULT VALUES"));}function |
||
0 ignored issues
–
show
|
|||
194 | insertUpdate($R,$M,$md){return |
||
0 ignored issues
–
show
|
|||
195 | false;}function |
||
0 ignored issues
–
show
|
|||
196 | begin(){return |
||
197 | queries("BEGIN");}function |
||
0 ignored issues
–
show
|
|||
198 | commit(){return |
||
199 | queries("COMMIT");}function |
||
0 ignored issues
–
show
|
|||
200 | rollback(){return |
||
201 | View Code Duplication | queries("ROLLBACK");}}$jb=array("server"=>"MySQL")+$jb;if(!defined("DRIVER")){$kd=array("MySQLi","MySQL","PDO_MySQL");define("DRIVER","server");if(extension_loaded("mysqli")){class |
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_DB has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L201-211) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
202 | Min_DB |
||
203 | extends |
||
204 | MySQLi{var$extension="MySQLi";function |
||
0 ignored issues
–
show
|
|||
205 | __construct(){parent::init();}function |
||
0 ignored issues
–
show
It seems like you call parent on a different method (
init() instead of __construct() ). Are you sure this is correct? If so, you might want to change this to $this->init() .
This check looks for a call to a parent method whose name is different than the method from which it is called. Consider the following code: class Daddy
{
protected function getFirstName()
{
return "Eidur";
}
protected function getSurName()
{
return "Gudjohnsen";
}
}
class Son
{
public function getFirstName()
{
return parent::getSurname();
}
}
The ![]() |
|||
206 | connect($O="",$T="",$G="",$Za=null,$id=null,$Qd=null){mysqli_report(MYSQLI_REPORT_OFF);list($dc,$id)=explode(":",$O,2);$K=@$this->real_connect(($O!=""?$dc:ini_get("mysqli.default_host")),($O.$T!=""?$T:ini_get("mysqli.default_user")),($O.$T.$G!=""?$G:ini_get("mysqli.default_pw")),$Za,(is_numeric($id)?$id:ini_get("mysqli.default_port")),(!is_numeric($id)?$id:$Qd));return$K;}function |
||
0 ignored issues
–
show
|
|||
207 | set_charset($Da){if(parent::set_charset($Da))return |
||
208 | true;parent::set_charset('utf8');return$this->query("SET NAMES $Da");}function |
||
0 ignored issues
–
show
|
|||
209 | result($I,$l=0){$J=$this->query($I);if(!$J)return |
||
210 | false;$L=$J->fetch_array();return$L[$l];}function |
||
0 ignored issues
–
show
The method
fetch_array() does not seem to exist on object<Min_Result> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
211 | quote($Q){return"'".$this->escape_string($Q)."'";}}}elseif(extension_loaded("mysql")&&!(ini_get("sql.safe_mode")&&extension_loaded("pdo_mysql"))){class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_DB has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L201-211) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
212 | Min_DB{var$extension="MySQL",$server_info,$affected_rows,$errno,$error,$_link,$_result;function |
||
0 ignored issues
–
show
|
|||
213 | connect($O,$T,$G){$this->_link=@mysql_connect(($O!=""?$O:ini_get("mysql.default_host")),("$O$T"!=""?$T:ini_get("mysql.default_user")),("$O$T$G"!=""?$G:ini_get("mysql.default_password")),true,131072);if($this->_link)$this->server_info=mysql_get_server_info($this->_link);else$this->error=mysql_error();return(bool)$this->_link;}function |
||
0 ignored issues
–
show
|
|||
214 | set_charset($Da){if(function_exists('mysql_set_charset')){if(mysql_set_charset($Da,$this->_link))return |
||
215 | true;mysql_set_charset('utf8',$this->_link);}return$this->query("SET NAMES $Da");}function |
||
0 ignored issues
–
show
|
|||
216 | quote($Q){return"'".mysql_real_escape_string($Q,$this->_link)."'";}function |
||
0 ignored issues
–
show
|
|||
217 | select_db($Za){return |
||
218 | mysql_select_db($Za,$this->_link);}function |
||
0 ignored issues
–
show
|
|||
219 | query($I,$xe=false){$J=@($xe?mysql_unbuffered_query($I,$this->_link):mysql_query($I,$this->_link));$this->error="";if(!$J){$this->errno=mysql_errno($this->_link);$this->error=mysql_error($this->_link);return |
||
220 | false;}if($J===true){$this->affected_rows=mysql_affected_rows($this->_link);$this->info=mysql_info($this->_link);return |
||
221 | true;}return |
||
222 | new |
||
223 | Min_Result($J);}function |
||
0 ignored issues
–
show
|
|||
224 | multi_query($I){return$this->_result=$this->query($I);}function |
||
0 ignored issues
–
show
|
|||
225 | store_result(){return$this->_result;}function |
||
0 ignored issues
–
show
|
|||
226 | next_result(){return |
||
227 | false;}function |
||
0 ignored issues
–
show
|
|||
228 | result($I,$l=0){$J=$this->query($I);if(!$J||!$J->num_rows)return |
||
229 | false;return |
||
230 | mysql_result($J->_result,0,$l);}}class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_Result has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L230-238) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
231 | Min_Result{var$num_rows,$_result,$_offset=0;function |
||
0 ignored issues
–
show
|
|||
232 | __construct($J){$this->_result=$J;$this->num_rows=mysql_num_rows($J);}function |
||
0 ignored issues
–
show
|
|||
233 | fetch_assoc(){return |
||
234 | mysql_fetch_assoc($this->_result);}function |
||
0 ignored issues
–
show
|
|||
235 | fetch_row(){return |
||
236 | mysql_fetch_row($this->_result);}function |
||
0 ignored issues
–
show
|
|||
237 | fetch_field(){$K=mysql_fetch_field($this->_result,$this->_offset++);$K->orgtable=$K->table;$K->orgname=$K->name;$K->charsetnr=($K->blob?63:0);return$K;}function |
||
0 ignored issues
–
show
|
|||
238 | __destruct(){mysql_free_result($this->_result);}}}elseif(extension_loaded("pdo_mysql")){class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_DB has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L201-211) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
239 | Min_DB |
||
240 | extends |
||
241 | Min_PDO{var$extension="PDO_MySQL";function |
||
0 ignored issues
–
show
|
|||
242 | connect($O,$T,$G){$this->dsn("mysql:charset=utf8;host=".str_replace(":",";unix_socket=",preg_replace('~:(\\d)~',';port=\\1',$O)),$T,$G);return |
||
0 ignored issues
–
show
The method
dsn() does not seem to exist on object<Min_DB> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
243 | true;}function |
||
0 ignored issues
–
show
|
|||
244 | set_charset($Da){$this->query("SET NAMES $Da");}function |
||
0 ignored issues
–
show
|
|||
245 | select_db($Za){return$this->query("USE ".idf_escape($Za));}function |
||
0 ignored issues
–
show
|
|||
246 | query($I,$xe=false){$this->setAttribute(1000,!$xe);return |
||
0 ignored issues
–
show
The method
setAttribute() does not seem to exist on object<Min_DB> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
247 | parent::query($I,$xe);}}}class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Min_Driver has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L247-256) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
248 | Min_Driver |
||
249 | extends |
||
250 | Min_SQL{function |
||
0 ignored issues
–
show
|
|||
251 | insert($R,$P){return($P?parent::insert($R,$P):queries("INSERT INTO ".table($R)." ()\nVALUES ()"));}function |
||
0 ignored issues
–
show
|
|||
252 | insertUpdate($R,$M,$md){$e=array_keys(reset($M));$ld="INSERT INTO ".table($R)." (".implode(", ",$e).") VALUES\n";$Ge=array();foreach($e |
||
253 | as$x)$Ge[$x]="$x = VALUES($x)";$Zd="\nON DUPLICATE KEY UPDATE ".implode(", ",$Ge);$Ge=array();$xc=0;foreach($M |
||
254 | as$P){$W="(".implode(", ",$P).")";if($Ge&&(strlen($ld)+$xc+strlen($W)+strlen($Zd)>1e6)){if(!queries($ld.implode(",\n",$Ge).$Zd))return |
||
0 ignored issues
–
show
The expression
$Ge of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
255 | false;$Ge=array();$xc=0;}$Ge[]=$W;$xc+=strlen($W)+2;}return |
||
256 | queries($ld.implode(",\n",$Ge).$Zd);}}function |
||
0 ignored issues
–
show
The function
idf_escape() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L256-257) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
257 | idf_escape($gc){return"`".str_replace("`","``",$gc)."`";}function |
||
0 ignored issues
–
show
The function
table() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L257-259) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
258 | table($gc){return |
||
259 | idf_escape($gc);}function |
||
0 ignored issues
–
show
The function
connect() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L259-261) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
260 | connect(){global$b;$f=new |
||
261 | Min_DB;$Xa=$b->credentials();if($f->connect($Xa[0],$Xa[1],$Xa[2])){$f->set_charset(charset($f));$f->query("SET sql_quote_show_create = 1, autocommit = 1");return$f;}$K=$f->error;if(function_exists('iconv')&&!is_utf8($K)&&strlen($Ed=iconv("windows-1250","utf-8",$K))>strlen($K))$K=$Ed;return$K;}function |
||
0 ignored issues
–
show
The function
get_databases() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L261-262) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
262 | get_databases($Jb){global$f;$K=get_session("dbs");if($K===null){$I=($f->server_info>=5?"SELECT SCHEMA_NAME FROM information_schema.SCHEMATA":"SHOW DATABASES");$K=($Jb?slow_query($I):get_vals($I));restart_session();set_session("dbs",$K);stop_session();}return$K;}function |
||
0 ignored issues
–
show
The function
limit() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L262-263) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
263 | limit($I,$Y,$y,$Pc=0,$Kd=" "){return" $I$Y".($y!==null?$Kd."LIMIT $y".($Pc?" OFFSET $Pc":""):"");}function |
||
0 ignored issues
–
show
The function
limit1() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L263-265) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
264 | limit1($I,$Y){return |
||
265 | limit($I,$Y,1);}function |
||
0 ignored issues
–
show
The function
db_collation() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L265-266) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
266 | db_collation($h,$Na){global$f;$K=null;$Va=$f->result("SHOW CREATE DATABASE ".idf_escape($h),1);if(preg_match('~ COLLATE ([^ ]+)~',$Va,$A))$K=$A[1];elseif(preg_match('~ CHARACTER SET ([^ ]+)~',$Va,$A))$K=$Na[$A[1]][-1];return$K;}function |
||
0 ignored issues
–
show
The function
engines() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L266-267) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
267 | engines(){$K=array();foreach(get_rows("SHOW ENGINES")as$L){if(preg_match("~YES|DEFAULT~",$L["Support"]))$K[]=$L["Engine"];}return$K;}function |
||
0 ignored issues
–
show
The function
logged_user() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L267-268) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
268 | logged_user(){global$f;return$f->result("SELECT USER()");}function |
||
0 ignored issues
–
show
The function
tables_list() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L268-270) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
269 | tables_list(){global$f;return |
||
270 | get_key_vals($f->server_info>=5?"SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME":"SHOW TABLES");}function |
||
0 ignored issues
–
show
The function
count_tables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L270-272) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
271 | count_tables($ab){$K=array();foreach($ab |
||
272 | as$h)$K[$h]=count(get_vals("SHOW TABLES IN ".idf_escape($h)));return$K;}function |
||
0 ignored issues
–
show
The function
table_status() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L272-273) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
273 | table_status($D="",$Cb=false){global$f;$K=array();foreach(get_rows($Cb&&$f->server_info>=5?"SELECT TABLE_NAME AS Name, Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ".($D!=""?"AND TABLE_NAME = ".q($D):"ORDER BY Name"):"SHOW TABLE STATUS".($D!=""?" LIKE ".q(addcslashes($D,"%_\\")):""))as$L){if($L["Engine"]=="InnoDB")$L["Comment"]=preg_replace('~(?:(.+); )?InnoDB free: .*~','\\1',$L["Comment"]);if(!isset($L["Engine"]))$L["Comment"]="";if($D!="")return$L;$K[$L["Name"]]=$L;}return$K;}function |
||
0 ignored issues
–
show
The function
is_view() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L273-274) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
274 | is_view($S){return$S["Engine"]===null;}function |
||
0 ignored issues
–
show
The function
fk_support() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L274-276) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
275 | fk_support($S){global$f;return |
||
276 | preg_match('~InnoDB|IBMDB2I~i',$S["Engine"])||(preg_match('~NDB~i',$S["Engine"])&&version_compare($f->server_info,'5.6')>=0);}function |
||
0 ignored issues
–
show
The function
fields() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L276-277) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
277 | fields($R){$K=array();foreach(get_rows("SHOW FULL COLUMNS FROM ".table($R))as$L){preg_match('~^([^( ]+)(?:\\((.+)\\))?( unsigned)?( zerofill)?$~',$L["Type"],$A);$K[$L["Field"]]=array("field"=>$L["Field"],"full_type"=>$L["Type"],"type"=>$A[1],"length"=>$A[2],"unsigned"=>ltrim($A[3].$A[4]),"default"=>($L["Default"]!=""||preg_match("~char|set~",$A[1])?$L["Default"]:null),"null"=>($L["Null"]=="YES"),"auto_increment"=>($L["Extra"]=="auto_increment"),"on_update"=>(preg_match('~^on update (.+)~i',$L["Extra"],$A)?$A[1]:""),"collation"=>$L["Collation"],"privileges"=>array_flip(preg_split('~, *~',$L["Privileges"])),"comment"=>$L["Comment"],"primary"=>($L["Key"]=="PRI"),);}return$K;}function |
||
0 ignored issues
–
show
The function
indexes() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L277-278) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
278 | indexes($R,$g=null){$K=array();foreach(get_rows("SHOW INDEX FROM ".table($R),$g)as$L){$K[$L["Key_name"]]["type"]=($L["Key_name"]=="PRIMARY"?"PRIMARY":($L["Index_type"]=="FULLTEXT"?"FULLTEXT":($L["Non_unique"]?"INDEX":"UNIQUE")));$K[$L["Key_name"]]["columns"][]=$L["Column_name"];$K[$L["Key_name"]]["lengths"][]=$L["Sub_part"];$K[$L["Key_name"]]["descs"][]=null;}return$K;}function |
||
0 ignored issues
–
show
The function
foreign_keys() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L278-280) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
279 | foreign_keys($R){global$f,$Rc;static$H='`(?:[^`]|``)+`';$K=array();$Wa=$f->result("SHOW CREATE TABLE ".table($R),1);if($Wa){preg_match_all("~CONSTRAINT ($H) FOREIGN KEY ?\\(((?:$H,? ?)+)\\) REFERENCES ($H)(?:\\.($H))? \\(((?:$H,? ?)+)\\)(?: ON DELETE ($Rc))?(?: ON UPDATE ($Rc))?~",$Wa,$Bc,PREG_SET_ORDER);foreach($Bc |
||
0 ignored issues
–
show
The expression
$Bc of type null|array<integer,array<integer,string>> is not guaranteed to be traversable. How about adding an additional type check?
There are different options of fixing this problem.
![]() |
|||
280 | as$A){preg_match_all("~$H~",$A[2],$Rd);preg_match_all("~$H~",$A[5],$fe);$K[idf_unescape($A[1])]=array("db"=>idf_unescape($A[4]!=""?$A[3]:$A[4]),"table"=>idf_unescape($A[4]!=""?$A[4]:$A[3]),"source"=>array_map('idf_unescape',$Rd[0]),"target"=>array_map('idf_unescape',$fe[0]),"on_delete"=>($A[6]?$A[6]:"RESTRICT"),"on_update"=>($A[7]?$A[7]:"RESTRICT"),);}}return$K;}function |
||
0 ignored issues
–
show
The function
view() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L280-282) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
281 | view($D){global$f;return |
||
282 | array("select"=>preg_replace('~^(?:[^`]|`[^`]*`)*\\s+AS\\s+~isU','',$f->result("SHOW CREATE VIEW ".table($D),1)));}function |
||
0 ignored issues
–
show
The function
collations() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L282-284) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
283 | collations(){$K=array();foreach(get_rows("SHOW COLLATION")as$L){if($L["Default"])$K[$L["Charset"]][-1]=$L["Collation"];else$K[$L["Charset"]][]=$L["Collation"];}ksort($K);foreach($K |
||
284 | as$x=>$V)asort($K[$x]);return$K;}function |
||
0 ignored issues
–
show
The function
information_schema() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L284-285) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
285 | information_schema($h){global$f;return($f->server_info>=5&&$h=="information_schema")||($f->server_info>=5.5&&$h=="performance_schema");}function |
||
0 ignored issues
–
show
The function
error() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L285-287) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
286 | error(){global$f;return |
||
287 | h(preg_replace('~^You have an error.*syntax to use~U',"Syntax error",$f->error));}function |
||
0 ignored issues
–
show
The function
create_database() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L287-289) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
288 | create_database($h,$Ma){return |
||
289 | queries("CREATE DATABASE ".idf_escape($h).($Ma?" COLLATE ".q($Ma):""));}function |
||
0 ignored issues
–
show
The function
drop_databases() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L289-290) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
290 | drop_databases($ab){$K=apply_queries("DROP DATABASE",$ab,'idf_escape');restart_session();set_session("dbs",null);return$K;}function |
||
0 ignored issues
–
show
The function
rename_database() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L290-291) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
291 | rename_database($D,$Ma){$K=false;if(create_database($D,$Ma)){$zd=array();foreach(tables_list()as$R=>$ue)$zd[]=table($R)." TO ".idf_escape($D).".".table($R);$K=(!$zd||queries("RENAME TABLE ".implode(", ",$zd)));if($K)queries("DROP DATABASE ".idf_escape(DB));restart_session();set_session("dbs",null);}return$K;}function |
||
0 ignored issues
–
show
The function
auto_increment() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L291-292) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() The expression
$zd of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
292 | auto_increment(){$ta=" PRIMARY KEY";if($_GET["create"]!=""&&$_POST["auto_increment_col"]){foreach(indexes($_GET["create"])as$s){if(in_array($_POST["fields"][$_POST["auto_increment_col"]]["orig"],$s["columns"],true)){$ta="";break;}if($s["type"]=="PRIMARY")$ta=" UNIQUE";}}return" AUTO_INCREMENT$ta";}function |
||
0 ignored issues
–
show
The function
alter_table() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L292-295) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
293 | alter_table($R,$D,$m,$Kb,$Qa,$tb,$Ma,$sa,$fd){$ma=array();foreach($m |
||
294 | as$l)$ma[]=($l[1]?($R!=""?($l[0]!=""?"CHANGE ".idf_escape($l[0]):"ADD"):" ")." ".implode($l[1]).($R!=""?$l[2]:""):"DROP ".idf_escape($l[0]));$ma=array_merge($ma,$Kb);$Ud=($Qa!==null?" COMMENT=".q($Qa):"").($tb?" ENGINE=".q($tb):"").($Ma?" COLLATE ".q($Ma):"").($sa!=""?" AUTO_INCREMENT=$sa":"");if($R=="")return |
||
295 | queries("CREATE TABLE ".table($D)." (\n".implode(",\n",$ma)."\n)$Ud$fd");if($R!=$D)$ma[]="RENAME TO ".table($D);if($Ud)$ma[]=ltrim($Ud);return($ma||$fd?queries("ALTER TABLE ".table($R)."\n".implode(",\n",$ma).$fd):true);}function |
||
0 ignored issues
–
show
The function
alter_indexes() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L295-298) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() The expression
$ma of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
296 | alter_indexes($R,$ma){foreach($ma |
||
297 | as$x=>$V)$ma[$x]=($V[2]=="DROP"?"\nDROP INDEX ".idf_escape($V[1]):"\nADD $V[0] ".($V[0]=="PRIMARY"?"KEY ":"").($V[1]!=""?idf_escape($V[1])." ":"")."(".implode(", ",$V[2]).")");return |
||
298 | queries("ALTER TABLE ".table($R).implode(",",$ma));}function |
||
0 ignored issues
–
show
The function
truncate_tables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L298-300) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
299 | truncate_tables($ee){return |
||
300 | apply_queries("TRUNCATE TABLE",$ee);}function |
||
0 ignored issues
–
show
The function
drop_views() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L300-302) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
301 | drop_views($Ie){return |
||
302 | queries("DROP VIEW ".implode(", ",array_map('table',$Ie)));}function |
||
0 ignored issues
–
show
The function
drop_tables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L302-304) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
303 | drop_tables($ee){return |
||
304 | queries("DROP TABLE ".implode(", ",array_map('table',$ee)));}function |
||
0 ignored issues
–
show
The function
move_tables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L304-306) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
305 | move_tables($ee,$Ie,$fe){$zd=array();foreach(array_merge($ee,$Ie)as$R)$zd[]=table($R)." TO ".idf_escape($fe).".".table($R);return |
||
306 | queries("RENAME TABLE ".implode(", ",$zd));}function |
||
0 ignored issues
–
show
The function
copy_tables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L306-312) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
307 | copy_tables($ee,$Ie,$fe){queries("SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'");foreach($ee |
||
308 | as$R){$D=($fe==DB?table("copy_$R"):idf_escape($fe).".".table($R));if(!queries("\nDROP TABLE IF EXISTS $D")||!queries("CREATE TABLE $D LIKE ".table($R))||!queries("INSERT INTO $D SELECT * FROM ".table($R)))return |
||
309 | false;}foreach($Ie |
||
310 | as$R){$D=($fe==DB?table("copy_$R"):idf_escape($fe).".".table($R));$He=view($R);if(!queries("DROP VIEW IF EXISTS $D")||!queries("CREATE VIEW $D AS $He[select]"))return |
||
311 | false;}return |
||
312 | true;}function |
||
0 ignored issues
–
show
The function
trigger() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L312-315) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
313 | trigger($D){if($D=="")return |
||
314 | array();$M=get_rows("SHOW TRIGGERS WHERE `Trigger` = ".q($D));return |
||
315 | reset($M);}function |
||
0 ignored issues
–
show
The function
triggers() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L315-316) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
316 | triggers($R){$K=array();foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($R,"%_\\")))as$L)$K[$L["Trigger"]]=array($L["Timing"],$L["Event"]);return$K;}function |
||
0 ignored issues
–
show
The function
trigger_options() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L316-318) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
317 | trigger_options(){return |
||
318 | array("Timing"=>array("BEFORE","AFTER"),"Event"=>array("INSERT","UPDATE","DELETE"),"Type"=>array("FOR EACH ROW"),);}function |
||
0 ignored issues
–
show
The function
routine() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L318-322) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
319 | routine($D,$ue){global$f,$ub,$lc,$we;$la=array("bool","boolean","integer","double precision","real","dec","numeric","fixed","national char","national varchar");$ve="((".implode("|",array_merge(array_keys($we),$la)).")\\b(?:\\s*\\(((?:[^'\")]|$ub)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";$H="\\s*(".($ue=="FUNCTION"?"":$lc).")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$ve";$Va=$f->result("SHOW CREATE $ue ".idf_escape($D),2);preg_match("~\\(((?:$H\\s*,?)*)\\)\\s*".($ue=="FUNCTION"?"RETURNS\\s+$ve\\s+":"")."(.*)~is",$Va,$A);$m=array();preg_match_all("~$H\\s*,?~is",$A[1],$Bc,PREG_SET_ORDER);foreach($Bc |
||
0 ignored issues
–
show
The expression
$Bc of type null|array<integer,array<integer,string>> is not guaranteed to be traversable. How about adding an additional type check?
There are different options of fixing this problem.
![]() |
|||
320 | as$dd){$D=str_replace("``","`",$dd[2]).$dd[3];$m[]=array("field"=>$D,"type"=>strtolower($dd[5]),"length"=>preg_replace_callback("~$ub~s",'normalize_enum',$dd[6]),"unsigned"=>strtolower(preg_replace('~\\s+~',' ',trim("$dd[8] $dd[7]"))),"null"=>1,"full_type"=>$dd[4],"inout"=>strtoupper($dd[1]),"collation"=>strtolower($dd[9]),);}if($ue!="FUNCTION")return |
||
321 | array("fields"=>$m,"definition"=>$A[11]);return |
||
322 | array("fields"=>$m,"returns"=>array("type"=>$A[12],"length"=>$A[13],"unsigned"=>$A[15],"collation"=>$A[16]),"definition"=>$A[17],"language"=>"SQL",);}function |
||
0 ignored issues
–
show
The function
routines() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L322-324) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
323 | routines(){return |
||
324 | get_rows("SELECT ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = ".q(DB));}function |
||
0 ignored issues
–
show
The function
routine_languages() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L324-326) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
325 | routine_languages(){return |
||
326 | array();}function |
||
0 ignored issues
–
show
The function
last_id() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L326-327) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
327 | last_id(){global$f;return$f->result("SELECT LAST_INSERT_ID()");}function |
||
0 ignored issues
–
show
The function
explain() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L327-328) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
328 | explain($f,$I){return$f->query("EXPLAIN ".($f->server_info>=5.1?"PARTITIONS ":"").$I);}function |
||
0 ignored issues
–
show
The function
found_rows() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L328-329) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
329 | found_rows($S,$Y){return($Y||$S["Engine"]!="InnoDB"?null:$S["Rows"]);}function |
||
0 ignored issues
–
show
The function
types() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L329-331) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
330 | types(){return |
||
331 | array();}function |
||
0 ignored issues
–
show
The function
schemas() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L331-333) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
332 | schemas(){return |
||
333 | array();}function |
||
0 ignored issues
–
show
The function
get_schema() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L333-334) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
334 | get_schema(){return"";}function |
||
0 ignored issues
–
show
The function
set_schema() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L334-336) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
335 | set_schema($Fd){return |
||
0 ignored issues
–
show
|
|||
336 | true;}function |
||
0 ignored issues
–
show
The function
create_sql() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L336-337) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
337 | create_sql($R,$sa){global$f;$K=$f->result("SHOW CREATE TABLE ".table($R),1);if(!$sa)$K=preg_replace('~ AUTO_INCREMENT=\\d+~','',$K);return$K;}function |
||
0 ignored issues
–
show
The function
truncate_sql() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L337-338) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
338 | truncate_sql($R){return"TRUNCATE ".table($R);}function |
||
0 ignored issues
–
show
The function
use_sql() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L338-339) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
339 | use_sql($Za){return"USE ".idf_escape($Za);}function |
||
0 ignored issues
–
show
The function
trigger_sql() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L339-340) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
340 | trigger_sql($R,$Xd){$K="";foreach(get_rows("SHOW TRIGGERS LIKE ".q(addcslashes($R,"%_\\")),null,"-- ")as$L)$K.="\n".($Xd=='CREATE+ALTER'?"DROP TRIGGER IF EXISTS ".idf_escape($L["Trigger"]).";;\n":"")."CREATE TRIGGER ".idf_escape($L["Trigger"])." $L[Timing] $L[Event] ON ".table($L["Table"])." FOR EACH ROW\n$L[Statement];;\n";return$K;}function |
||
0 ignored issues
–
show
The function
show_variables() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L340-342) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
341 | show_variables(){return |
||
342 | get_key_vals("SHOW VARIABLES");}function |
||
0 ignored issues
–
show
The function
process_list() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L342-344) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
343 | process_list(){return |
||
344 | get_rows("SHOW FULL PROCESSLIST");}function |
||
0 ignored issues
–
show
The function
show_status() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L344-346) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
345 | show_status(){return |
||
346 | get_key_vals("SHOW STATUS");}function |
||
0 ignored issues
–
show
The function
convert_field() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L346-347) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
347 | convert_field($l){if(preg_match("~binary~",$l["type"]))return"HEX(".idf_escape($l["field"]).")";if($l["type"]=="bit")return"BIN(".idf_escape($l["field"])." + 0)";if(preg_match("~geometry|point|linestring|polygon~",$l["type"]))return"AsWKT(".idf_escape($l["field"]).")";}function |
||
0 ignored issues
–
show
The function
unconvert_field() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L347-348) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
348 | unconvert_field($l,$K){if(preg_match("~binary~",$l["type"]))$K="UNHEX($K)";if($l["type"]=="bit")$K="CONV($K, 2, 10) + 0";if(preg_match("~geometry|point|linestring|polygon~",$l["type"]))$K="GeomFromText($K)";return$K;}function |
||
0 ignored issues
–
show
The function
support() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L348-349) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
349 | support($Db){global$f;return!preg_match("~scheme|sequence|type|view_trigger".($f->server_info<5.1?"|event|partitioning".($f->server_info<5?"|routine|trigger|view":""):"")."~",$Db);}function |
||
0 ignored issues
–
show
The function
kill_process() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L349-351) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
350 | kill_process($V){return |
||
351 | queries("KILL ".number($V));}function |
||
0 ignored issues
–
show
The function
max_connections() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L351-352) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
352 | max_connections(){global$f;return$f->result("SELECT @@max_connections");}$v="sql";$we=array();$Wd=array();foreach(array('Numbers'=>array("tinyint"=>3,"smallint"=>5,"mediumint"=>8,"int"=>10,"bigint"=>20,"decimal"=>66,"float"=>12,"double"=>21),'Date and time'=>array("date"=>10,"datetime"=>19,"timestamp"=>19,"time"=>10,"year"=>4),'Strings'=>array("char"=>255,"varchar"=>65535,"tinytext"=>255,"text"=>65535,"mediumtext"=>16777215,"longtext"=>4294967295),'Lists'=>array("enum"=>65535,"set"=>64),'Binary'=>array("bit"=>20,"binary"=>255,"varbinary"=>65535,"tinyblob"=>255,"blob"=>65535,"mediumblob"=>16777215,"longblob"=>4294967295),'Geometry'=>array("geometry"=>0,"point"=>0,"linestring"=>0,"polygon"=>0,"multipoint"=>0,"multilinestring"=>0,"multipolygon"=>0,"geometrycollection"=>0),)as$x=>$V){$we+=$V;$Wd[$x]=array_keys($V);}$Ce=array("unsigned","zerofill","unsigned zerofill");$Wc=array("=","<",">","<=",">=","!=","LIKE","LIKE %%","REGEXP","IN","IS NULL","NOT LIKE","NOT REGEXP","NOT IN","IS NOT NULL","SQL");$Tb=array("char_length","date","from_unixtime","lower","round","sec_to_time","time_to_sec","upper");$Vb=array("avg","count","count distinct","group_concat","max","min","sum");$mb=array(array("char"=>"md5/sha1/password/encrypt/uuid","binary"=>"md5/sha1","date|time"=>"now",),array("(^|[^o])int|float|double|decimal"=>"+/-","date"=>"+ interval/- interval","time"=>"addtime/subtime","char|text"=>"concat",));}define("SERVER",$_GET[DRIVER]);define("DB",$_GET["db"]);define("ME",preg_replace('~^[^?]*/([^?]*).*~','\\1',$_SERVER["REQUEST_URI"]).'?'.(sid()?SID.'&':'').(SERVER!==null?DRIVER."=".urlencode(SERVER).'&':'').(isset($_GET["username"])?"username=".urlencode($_GET["username"]).'&':'').(DB!=""?'db='.urlencode(DB).'&'.(isset($_GET["ns"])?"ns=".urlencode($_GET["ns"])."&":""):''));$ca="4.2.5";class |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
The type
Adminer has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L352-463) is considered.
This check looks for classes that have been defined more than once. If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface. This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP. ![]() |
|||
353 | Adminer{var$operators=array("<=",">=");var$_values=array();function |
||
0 ignored issues
–
show
|
|||
354 | name(){return"<a href='https://www.adminer.org/editor/' target='_blank' id='h1'>".'Editor'."</a>";}function |
||
0 ignored issues
–
show
|
|||
355 | credentials(){return |
||
356 | array(SERVER,$_GET["username"],get_password());}function |
||
0 ignored issues
–
show
|
|||
357 | permanentLogin($Va=false){return |
||
358 | password_file($Va);}function |
||
0 ignored issues
–
show
|
|||
359 | bruteForceKey(){return$_SERVER["REMOTE_ADDR"];}function |
||
0 ignored issues
–
show
|
|||
360 | database(){global$f;if($f){$ab=$this->databases(false);return(!$ab?$f->result("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1)"):$ab[(information_schema($ab[0])?1:0)]);}}function |
||
0 ignored issues
–
show
|
|||
361 | schemas(){return |
||
362 | schemas();}function |
||
0 ignored issues
–
show
|
|||
363 | databases($Jb=true){return |
||
364 | get_databases($Jb);}function |
||
0 ignored issues
–
show
|
|||
365 | queryTimeout(){return |
||
366 | 5;}function |
||
0 ignored issues
–
show
|
|||
367 | headers(){return |
||
368 | true;}function |
||
0 ignored issues
–
show
|
|||
369 | head(){return |
||
370 | true;}function |
||
0 ignored issues
–
show
|
|||
371 | loginForm(){echo'<table cellspacing="0"> |
||
372 | <tr><th>Username<td><input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="',h($_GET["username"]),'" autocapitalize="off"> |
||
373 | <tr><th>Password<td><input type="password" name="auth[password]"> |
||
374 | </table> |
||
375 | <script type="text/javascript"> |
||
376 | focus(document.getElementById(\'username\')); |
||
377 | </script> |
||
378 | ',"<p><input type='submit' value='".'Login'."'>\n",checkbox("auth[permanent]",1,$_COOKIE["adminer_permanent"],'Permanent login')."\n";}function |
||
0 ignored issues
–
show
|
|||
379 | login($_c,$G){global$f;$f->query("SET time_zone = ".q(substr_replace(@date("O"),":",-2,0)));return |
||
0 ignored issues
–
show
|
|||
380 | true;}function |
||
0 ignored issues
–
show
|
|||
381 | tableName($ce){return |
||
382 | h($ce["Comment"]!=""?$ce["Comment"]:$ce["Name"]);}function |
||
0 ignored issues
–
show
|
|||
383 | fieldName($l,$E=0){return |
||
0 ignored issues
–
show
|
|||
384 | h($l["comment"]!=""?$l["comment"]:$l["field"]);}function |
||
0 ignored issues
–
show
|
|||
385 | selectLinks($ce,$P=""){$a=$ce["Name"];if($P!==null)echo'<p class="tabs"><a href="'.h(ME.'edit='.urlencode($a).$P).'">'.'New item'."</a>\n";}function |
||
0 ignored issues
–
show
|
|||
386 | foreignKeys($R){return |
||
387 | foreign_keys($R);}function |
||
0 ignored issues
–
show
|
|||
388 | backwardKeys($R,$be){$K=array();foreach(get_rows("SELECT TABLE_NAME, CONSTRAINT_NAME, COLUMN_NAME, REFERENCED_COLUMN_NAME |
||
389 | FROM information_schema.KEY_COLUMN_USAGE |
||
390 | WHERE TABLE_SCHEMA = ".q($this->database())." |
||
391 | AND REFERENCED_TABLE_SCHEMA = ".q($this->database())." |
||
392 | AND REFERENCED_TABLE_NAME = ".q($R)." |
||
393 | ORDER BY ORDINAL_POSITION",null,"")as$L)$K[$L["TABLE_NAME"]]["keys"][$L["CONSTRAINT_NAME"]][$L["COLUMN_NAME"]]=$L["REFERENCED_COLUMN_NAME"];foreach($K |
||
394 | as$x=>$V){$D=$this->tableName(table_status($x,true));if($D!=""){$Gd=preg_quote($be);$Kd="(:|\\s*-)?\\s+";$K[$x]["name"]=(preg_match("(^$Gd$Kd(.+)|^(.+?)$Kd$Gd\$)iu",$D,$A)?$A[2].$A[3]:$D);}else |
||
395 | unset($K[$x]);}return$K;}function |
||
0 ignored issues
–
show
|
|||
396 | backwardKeysPrint($wa,$L){foreach($wa |
||
397 | as$R=>$va){foreach($va["keys"]as$Oa){$z=ME.'select='.urlencode($R);$q=0;foreach($Oa |
||
398 | as$d=>$V)$z.=where_link($q++,$d,$L[$V]);echo"<a href='".h($z)."'>".h($va["name"])."</a>";$z=ME.'edit='.urlencode($R);foreach($Oa |
||
399 | as$d=>$V)$z.="&set".urlencode("[".bracket_escape($d)."]")."=".urlencode($L[$V]);echo"<a href='".h($z)."' title='".'New item'."'>+</a> ";}}}function |
||
0 ignored issues
–
show
|
|||
400 | selectQuery($I,$je){return"<!--\n".str_replace("--","--><!-- ",$I)."\n($je)\n-->\n";}function |
||
0 ignored issues
–
show
|
|||
401 | rowDescription($R){foreach(fields($R)as$l){if(preg_match("~varchar|character varying~",$l["type"]))return |
||
402 | idf_escape($l["field"]);}return"";}function |
||
0 ignored issues
–
show
|
|||
403 | rowDescriptions($M,$Mb){$K=$M;foreach($M[0]as$x=>$V){if(list($R,$r,$D)=$this->_foreignColumn($Mb,$x)){$hc=array();foreach($M |
||
0 ignored issues
–
show
The method
_foreignColumn() does not seem to exist on object<Adminer> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
404 | as$L)$hc[$L[$x]]=q($L[$x]);$eb=$this->_values[$R];if(!$eb)$eb=get_key_vals("SELECT $r, $D FROM ".table($R)." WHERE $r IN (".implode(", ",$hc).")");foreach($M |
||
0 ignored issues
–
show
The property
_values does not exist. Did you maybe forget to declare it?
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code: class MyClass { }
$x = new MyClass();
$x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: class MyClass {
public $foo;
}
$x = new MyClass();
$x->foo = true;
![]() |
|||
405 | as$C=>$L){if(isset($L[$x]))$K[$C][$x]=(string)$eb[$L[$x]];}}}return$K;}function |
||
0 ignored issues
–
show
|
|||
406 | selectLink($V,$l){}function |
||
0 ignored issues
–
show
|
|||
407 | selectVal($V,$z,$l,$ad){$K=($V===null?" ":$V);$z=h($z);if(preg_match('~blob|bytea~',$l["type"])&&!is_utf8($V)){$K=lang(array('%d byte','%d bytes'),strlen($ad));if(preg_match("~^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)~",$ad))$K="<img src='$z' alt='$K'>";}if(like_bool($l)&&$K!=" ")$K=($V?'yes':'no');if($z)$K="<a href='$z'".(is_url($z)?" rel='noreferrer'":"").">$K</a>";if(!$z&&!like_bool($l)&&preg_match('~int|float|double|decimal~',$l["type"]))$K="<div class='number'>$K</div>";elseif(preg_match('~date~',$l["type"]))$K="<div class='datetime'>$K</div>";return$K;}function |
||
0 ignored issues
–
show
|
|||
408 | editVal($V,$l){if(preg_match('~date|timestamp~',$l["type"])&&$V!==null)return |
||
409 | preg_replace('~^(\\d{2}(\\d+))-(0?(\\d+))-(0?(\\d+))~','$1-$3-$5',$V);return$V;}function |
||
0 ignored issues
–
show
|
|||
410 | selectColumnsPrint($N,$e){}function |
||
0 ignored issues
–
show
|
|||
411 | selectSearchPrint($Y,$e,$t){$Y=(array)$_GET["where"];echo'<fieldset id="fieldset-search"><legend>'.'Search'."</legend><div>\n";$qc=array();foreach($Y |
||
0 ignored issues
–
show
|
|||
412 | as$x=>$V)$qc[$V["col"]]=$x;$q=0;$m=fields($_GET["select"]);foreach($e |
||
413 | as$D=>$db){$l=$m[$D];if(preg_match("~enum~",$l["type"])||like_bool($l)){$x=$qc[$D];$q--;echo"<div>".h($db)."<input type='hidden' name='where[$q][col]' value='".h($D)."'>:",(like_bool($l)?" <select name='where[$q][val]'>".optionlist(array(""=>"",'no','yes'),$Y[$x]["val"],true)."</select>":enum_input("checkbox"," name='where[$q][val][]'",$l,(array)$Y[$x]["val"],($l["null"]?0:null))),"</div>\n";unset($e[$D]);}elseif(is_array($Xc=$this->_foreignKeyOptions($_GET["select"],$D))){if($m[$D]["null"])$Xc[0]='('.'empty'.')';$x=$qc[$D];$q--;echo"<div>".h($db)."<input type='hidden' name='where[$q][col]' value='".h($D)."'><input type='hidden' name='where[$q][op]' value='='>: <select name='where[$q][val]'>".optionlist($Xc,$Y[$x]["val"],true)."</select></div>\n";unset($e[$D]);}}$q=0;foreach($Y |
||
0 ignored issues
–
show
The method
_foreignKeyOptions() does not seem to exist on object<Adminer> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
414 | as$V){if(($V["col"]==""||$e[$V["col"]])&&"$V[col]$V[val]"!=""){echo"<div><select name='where[$q][col]'><option value=''>(".'anywhere'.")".optionlist($e,$V["col"],true)."</select>",html_select("where[$q][op]",array(-1=>"")+$this->operators,$V["op"]),"<input type='search' name='where[$q][val]' value='".h($V["val"])."' onkeydown='selectSearchKeydown(this, event);' onsearch='selectSearchSearch(this);'></div>\n";$q++;}}echo"<div><select name='where[$q][col]' onchange='this.nextSibling.nextSibling.onchange();'><option value=''>(".'anywhere'.")".optionlist($e,null,true)."</select>",html_select("where[$q][op]",array(-1=>"")+$this->operators),"<input type='search' name='where[$q][val]' onchange='selectAddRow(this);' onsearch='selectSearch(this);'></div>\n","</div></fieldset>\n";}function |
||
0 ignored issues
–
show
|
|||
415 | selectOrderPrint($E,$e,$t){$Zc=array();foreach($t |
||
0 ignored issues
–
show
|
|||
416 | as$x=>$s){$E=array();foreach($s["columns"]as$V)$E[]=$e[$V];if(count(array_filter($E,'strlen'))>1&&$x!="PRIMARY")$Zc[$x]=implode(", ",$E);}if($Zc){echo'<fieldset><legend>'.'Sort'."</legend><div>","<select name='index_order'>".optionlist(array(""=>"")+$Zc,($_GET["order"][0]!=""?"":$_GET["index_order"]),true)."</select>","</div></fieldset>\n";}if($_GET["order"])echo"<div style='display: none;'>".hidden_fields(array("order"=>array(1=>reset($_GET["order"])),"desc"=>($_GET["desc"]?array(1=>1):array()),))."</div>\n";}function |
||
0 ignored issues
–
show
The expression
$Zc of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
417 | selectLimitPrint($y){echo"<fieldset><legend>".'Limit'."</legend><div>";echo |
||
418 | html_select("limit",array("","50","100"),$y),"</div></fieldset>\n";}function |
||
0 ignored issues
–
show
|
|||
419 | selectLengthPrint($he){}function |
||
0 ignored issues
–
show
|
|||
420 | selectActionPrint($t){echo"<fieldset><legend>".'Action'."</legend><div>","<input type='submit' value='".'Select'."'>","</div></fieldset>\n";}function |
||
0 ignored issues
–
show
|
|||
421 | selectCommandPrint(){return |
||
422 | true;}function |
||
0 ignored issues
–
show
|
|||
423 | selectImportPrint(){return |
||
424 | true;}function |
||
0 ignored issues
–
show
|
|||
425 | selectEmailPrint($qb,$e){if($qb){print_fieldset("email",'E-mail',$_POST["email_append"]);echo"<div onkeydown=\"eventStop(event); return bodyKeydown(event, 'email');\">\n","<p>".'From'.": <input name='email_from' value='".h($_POST?$_POST["email_from"]:$_COOKIE["adminer_email"])."'>\n",'Subject'.": <input name='email_subject' value='".h($_POST["email_subject"])."'>\n","<p><textarea name='email_message' rows='15' cols='75'>".h($_POST["email_message"].($_POST["email_append"]?'{$'."$_POST[email_addition]}":""))."</textarea>\n","<p onkeydown=\"eventStop(event); return bodyKeydown(event, 'email_append');\">".html_select("email_addition",$e,$_POST["email_addition"])."<input type='submit' name='email_append' value='".'Insert'."'>\n";echo"<p>".'Attachments'.": <input type='file' name='email_files[]' onchange=\"this.onchange = function () { }; var el = this.cloneNode(true); el.value = ''; this.parentNode.appendChild(el);\">","<p>".(count($qb)==1?'<input type="hidden" name="email_field" value="'.h(key($qb)).'">':html_select("email_field",$qb)),"<input type='submit' name='email' value='".'Send'."' onclick=\"return this.form['delete'].onclick();\">\n","</div>\n","</div></fieldset>\n";}}function |
||
0 ignored issues
–
show
|
|||
426 | selectColumnsProcess($e,$t){return |
||
0 ignored issues
–
show
|
|||
427 | array(array(),array());}function |
||
0 ignored issues
–
show
|
|||
428 | selectSearchProcess($m,$t){$K=array();foreach((array)$_GET["where"]as$x=>$Y){$La=$Y["col"];$Uc=$Y["op"];$V=$Y["val"];if(($x<0?"":$La).$V!=""){$Ra=array();foreach(($La!=""?array($La=>$m[$La]):$m)as$D=>$l){if($La!=""||is_numeric($V)||!preg_match('~int|float|double|decimal~',$l["type"])){$D=idf_escape($D);if($La!=""&&$l["type"]=="enum")$Ra[]=(in_array(0,$V)?"$D IS NULL OR ":"")."$D IN (".implode(", ",array_map('intval',$V)).")";else{$ie=preg_match('~char|text|enum|set~',$l["type"]);$W=$this->processInput($l,(!$Uc&&$ie&&preg_match('~^[^%]+$~',$V)?"%$V%":$V));$Ra[]=$D.($W=="NULL"?" IS".($Uc==">="?" NOT":"")." $W":(in_array($Uc,$this->operators)||$Uc=="="?" $Uc $W":($ie?" LIKE $W":" IN (".str_replace(",","', '",$W).")")));if($x<0&&$V=="0")$Ra[]="$D IS NULL";}}}$K[]=($Ra?"(".implode(" OR ",$Ra).")":"0");}}return$K;}function |
||
0 ignored issues
–
show
|
|||
429 | selectOrderProcess($m,$t){$jc=$_GET["index_order"];if($jc!="")unset($_GET["order"][1]);if($_GET["order"])return |
||
430 | array(idf_escape(reset($_GET["order"])).($_GET["desc"]?" DESC":""));foreach(($jc!=""?array($t[$jc]):$t)as$s){if($jc!=""||$s["type"]=="INDEX"){$Xb=array_filter($s["descs"]);$db=false;foreach($s["columns"]as$V){if(preg_match('~date|timestamp~',$m[$V]["type"])){$db=true;break;}}$K=array();foreach($s["columns"]as$x=>$V)$K[]=idf_escape($V).(($Xb?$s["descs"][$x]:$db)?" DESC":"");return$K;}}return |
||
431 | array();}function |
||
0 ignored issues
–
show
|
|||
432 | selectLimitProcess(){return(isset($_GET["limit"])?$_GET["limit"]:"50");}function |
||
0 ignored issues
–
show
|
|||
433 | selectLengthProcess(){return"100";}function |
||
0 ignored issues
–
show
|
|||
434 | selectEmailProcess($Y,$Mb){if($_POST["email_append"])return |
||
435 | true;if($_POST["email"]){$Jd=0;if($_POST["all"]||$_POST["check"]){$l=idf_escape($_POST["email_field"]);$Yd=$_POST["email_subject"];$B=$_POST["email_message"];preg_match_all('~\\{\\$([a-z0-9_]+)\\}~i',"$Yd.$B",$Bc);$M=get_rows("SELECT DISTINCT $l".($Bc[1]?", ".implode(", ",array_map('idf_escape',array_unique($Bc[1]))):"")." FROM ".table($_GET["select"])." WHERE $l IS NOT NULL AND $l != ''".($Y?" AND ".implode(" AND ",$Y):"").($_POST["all"]?"":" AND ((".implode(") OR (",array_map('where_check',(array)$_POST["check"]))."))"));$m=fields($_GET["select"]);foreach($this->rowDescriptions($M,$Mb)as$L){$_d=array('{\\'=>'{');foreach($Bc[1]as$V)$_d['{$'."$V}"]=$this->editVal($L[$V],$m[$V]);$pb=$L[$_POST["email_field"]];if(is_mail($pb)&&send_mail($pb,strtr($Yd,$_d),strtr($B,$_d),$_POST["email_from"],$_FILES["email_files"]))$Jd++;}}cookie("adminer_email",$_POST["email_from"]);redirect(remove_from_uri(),lang(array('%d e-mail has been sent.','%d e-mails have been sent.'),$Jd));}return |
||
436 | false;}function |
||
0 ignored issues
–
show
|
|||
437 | selectQueryBuild($N,$Y,$p,$E,$y,$F){return"";}function |
||
0 ignored issues
–
show
|
|||
438 | messageQuery($I,$je){return" <span class='time'>".@date("H:i:s")."</span><!--\n".str_replace("--","--><!-- ",$I)."\n".($je?"($je)\n":"")."-->";}function |
||
0 ignored issues
–
show
|
|||
439 | editFunctions($l){$K=array();if($l["null"]&&preg_match('~blob~',$l["type"]))$K["NULL"]='empty';$K[""]=($l["null"]||$l["auto_increment"]||like_bool($l)?"":"*");if(preg_match('~date|time~',$l["type"]))$K["now"]='now';if(preg_match('~_(md5|sha1)$~i',$l["field"],$A))$K[]=strtolower($A[1]);return$K;}function |
||
0 ignored issues
–
show
|
|||
440 | editInput($R,$l,$c,$W){if($l["type"]=="enum")return(isset($_GET["select"])?"<label><input type='radio'$c value='-1' checked><i>".'original'."</i></label> ":"").enum_input("radio",$c,$l,($W||isset($_GET["select"])?$W:0),($l["null"]?"":null));$Xc=$this->_foreignKeyOptions($R,$l["field"],$W);if($Xc!==null)return(is_array($Xc)?"<select$c>".optionlist($Xc,$W,true)."</select>":"<input value='".h($W)."'$c class='hidden'><input value='".h($Xc)."' class='jsonly' onkeyup=\"whisper('".h(ME."script=complete&source=".urlencode($R)."&field=".urlencode($l["field"]))."&value=', this);\"><div onclick='return whisperClick(event, this.previousSibling);'></div>");if(like_bool($l))return'<input type="checkbox" value="'.h($W?$W:1).'"'.($W?' checked':'')."$c>";$cc="";if(preg_match('~time~',$l["type"]))$cc='HH:MM:SS';if(preg_match('~date|timestamp~',$l["type"]))$cc='[yyyy]-mm-dd'.($cc?" [$cc]":"");if($cc)return"<input value='".h($W)."'$c> ($cc)";if(preg_match('~_(md5|sha1)$~i',$l["field"]))return"<input type='password' value='".h($W)."'$c>";return'';}function |
||
0 ignored issues
–
show
The method
_foreignKeyOptions() does not seem to exist on object<Adminer> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
441 | processInput($l,$W,$o=""){if($o=="now")return"$o()";$K=$W;if(preg_match('~date|timestamp~',$l["type"])&&preg_match('(^'.str_replace('\\$1','(?P<p1>\\d*)',preg_replace('~(\\\\\\$([2-6]))~','(?P<p\\2>\\d{1,2})',preg_quote('$1-$3-$5'))).'(.*))',$W,$A))$K=($A["p1"]!=""?$A["p1"]:($A["p2"]!=""?($A["p2"]<70?20:19).$A["p2"]:gmdate("Y")))."-$A[p3]$A[p4]-$A[p5]$A[p6]".end($A);$K=($l["type"]=="bit"&&preg_match('~^[0-9]+$~',$W)?$K:q($K));if($W==""&&like_bool($l))$K="0";elseif($W==""&&($l["null"]||!preg_match('~char|text~',$l["type"])))$K="NULL";elseif(preg_match('~^(md5|sha1)$~',$o))$K="$o($K)";return |
||
442 | unconvert_field($l,$K);}function |
||
0 ignored issues
–
show
|
|||
443 | dumpOutput(){return |
||
444 | array();}function |
||
0 ignored issues
–
show
|
|||
445 | dumpFormat(){return |
||
446 | array('csv'=>'CSV,','csv;'=>'CSV;','tsv'=>'TSV');}function |
||
0 ignored issues
–
show
|
|||
447 | dumpDatabase($h){}function |
||
0 ignored issues
–
show
|
|||
448 | dumpTable(){echo"\xef\xbb\xbf";}function |
||
0 ignored issues
–
show
|
|||
449 | dumpData($R,$Xd,$I){global$f;$J=$f->query($I,1);if($J){while($L=$J->fetch_assoc()){if($Xd=="table"){dump_csv(array_keys($L));$Xd="INSERT";}dump_csv($L);}}}function |
||
0 ignored issues
–
show
|
|||
450 | dumpFilename($fc){return |
||
451 | friendly_url($fc);}function |
||
0 ignored issues
–
show
|
|||
452 | dumpHeaders($fc,$Jc=false){$_b="csv";header("Content-Type: text/csv; charset=utf-8");return$_b;}function |
||
0 ignored issues
–
show
|
|||
453 | homepage(){return |
||
454 | true;}function |
||
0 ignored issues
–
show
|
|||
455 | navigation($Ic){global$ca;echo'<h1> |
||
456 | ',$this->name(),' <span class="version">',$ca,'</span> |
||
457 | <a href="https://www.adminer.org/editor/#download" target="_blank" id="version">',(version_compare($ca,$_COOKIE["adminer_version"])<0?h($_COOKIE["adminer_version"]):""),'</a> |
||
458 | </h1> |
||
459 | ';if($Ic=="auth"){$Ib=true;foreach((array)$_SESSION["pwds"]as$X=>$Nd){foreach($Nd[""]as$T=>$G){if($G!==null){if($Ib){echo"<p id='logins' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";$Ib=false;}echo"<a href='".h(auth_url($X,"",$T))."'>".($T!=""?h($T):"<i>".'empty'."</i>")."</a><br>\n";}}}}else{$this->databasesPrint($Ic);if($Ic!="db"&&$Ic!="ns"){$S=table_status('',true);if(!$S)echo"<p class='message'>".'No tables.'."\n";else$this->tablesPrint($S);}}}function |
||
0 ignored issues
–
show
|
|||
460 | databasesPrint($Ic){}function |
||
0 ignored issues
–
show
|
|||
461 | tablesPrint($ee){echo"<p id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";foreach($ee |
||
462 | as$L){$D=$this->tableName($L);if(isset($L["Engine"])&&$D!="")echo"<a href='".h(ME).'select='.urlencode($L["Name"])."'".bold($_GET["select"]==$L["Name"]||$_GET["edit"]==$L["Name"],"select")." title='".'Select data'."'>$D</a><br>\n";}}function |
||
0 ignored issues
–
show
|
|||
463 | _foreignColumn($Mb,$d){foreach((array)$Mb[$d]as$Lb){if(count($Lb["source"])==1){$D=$this->rowDescription($Lb["table"]);if($D!=""){$r=idf_escape($Lb["target"][0]);return |
||
464 | array($Lb["table"],$r,$D);}}}}function |
||
0 ignored issues
–
show
|
|||
465 | _foreignKeyOptions($R,$d,$W=null){global$f;if(list($fe,$r,$D)=$this->_foreignColumn(column_foreign_keys($R),$d)){$K=&$this->_values[$fe];if($K===null){$S=table_status($fe);$K=($S["Rows"]>1000?"":array(""=>"")+get_key_vals("SELECT $r, $D FROM ".table($fe)." ORDER BY 2"));}if(!$K&&$W!==null)return$f->result("SELECT $D FROM ".table($fe)." WHERE $r = ".q($W));return$K;}}}$b=(function_exists('adminer_object')?adminer_object():new |
||
0 ignored issues
–
show
The method
_foreignColumn() does not seem to exist on object<Adminer> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||
466 | View Code Duplication | Adminer);function |
|
0 ignored issues
–
show
The function
page_header() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L464-489) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This function seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
467 | page_header($le,$k="",$Ca=array(),$me=""){global$ba,$ca,$b,$jb,$v;page_headers();if(is_ajax()&&$k){page_messages($k);exit;}$ne=$le.($me!=""?": $me":"");$oe=strip_tags($ne.(SERVER!=""&&SERVER!="localhost"?h(" - ".SERVER):"")." - ".$b->name());echo'<!DOCTYPE html> |
||
468 | <html lang="en" dir="ltr"> |
||
469 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||
470 | <meta http-equiv="Content-Script-Type" content="text/javascript"> |
||
471 | <meta name="robots" content="noindex"> |
||
472 | <meta name="referrer" content="origin-when-crossorigin"> |
||
473 | <title>',$oe,'</title> |
||
474 | <link rel="stylesheet" type="text/css" href="',h(preg_replace("~\\?.*~","",ME))."?file=default.css&version=4.2.5&driver=mysql",'"> |
||
475 | <script type="text/javascript" src="',h(preg_replace("~\\?.*~","",ME))."?file=functions.js&version=4.2.5&driver=mysql",'"></script> |
||
476 | ';if($b->head()){echo'<link rel="shortcut icon" type="image/x-icon" href="',h(preg_replace("~\\?.*~","",ME))."?file=favicon.ico&version=4.2.5&driver=mysql",'"> |
||
477 | <link rel="apple-touch-icon" href="',h(preg_replace("~\\?.*~","",ME))."?file=favicon.ico&version=4.2.5&driver=mysql",'"> |
||
478 | ';if(file_exists("adminer.css")){echo'<link rel="stylesheet" type="text/css" href="adminer.css"> |
||
479 | ';}}echo' |
||
480 | <body class="ltr nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"',(isset($_COOKIE["adminer_version"])?"":" onload=\"verifyVersion('$ca');\"");?>> |
||
481 | <script type="text/javascript"> |
||
482 | document.body.className = document.body.className.replace(/ nojs/, ' js'); |
||
483 | var offlineMessage = '<?php echo |
||
484 | js_escape('You are offline.'),'\'; |
||
485 | </script> |
||
486 | |||
487 | <div id="help" class="jush-',$v,' jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div> |
||
488 | |||
489 | <div id="content"> |
||
490 | ';if($Ca!==null){$z=substr(preg_replace('~\b(username|db|ns)=[^&]*&~','',ME),0,-1);echo'<p id="breadcrumb"><a href="'.h($z?$z:".").'">'.$jb[DRIVER].'</a> » ';$z=substr(preg_replace('~\b(db|ns)=[^&]*&~','',ME),0,-1);$O=(SERVER!=""?h(SERVER):'Server');if($Ca===false)echo"$O\n";else{echo"<a href='".($z?h($z):".")."' accesskey='1' title='Alt+Shift+1'>$O</a> » ";if($_GET["ns"]!=""||(DB!=""&&is_array($Ca)))echo'<a href="'.h($z."&db=".urlencode(DB).(support("scheme")?"&ns=":"")).'">'.h(DB).'</a> » ';if(is_array($Ca)){if($_GET["ns"]!="")echo'<a href="'.h(substr(ME,0,-1)).'">'.h($_GET["ns"]).'</a> » ';foreach($Ca |
||
491 | as$x=>$V){$db=(is_array($V)?$V[1]:h($V));if($db!="")echo"<a href='".h(ME."$x=").urlencode(is_array($V)?$V[0]:$V)."'>$db</a> » ";}}echo"$le\n";}}echo"<h2>$ne</h2>\n","<div id='ajaxstatus' class='jsonly hidden'></div>\n";restart_session();page_messages($k);$ab=&get_session("dbs");if(DB!=""&&$ab&&!in_array(DB,$ab,true))$ab=null;stop_session();define("PAGE_HEADER",1);}function |
||
0 ignored issues
–
show
The function
page_headers() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L489-490) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
492 | page_headers(){global$b;header("Content-Type: text/html; charset=utf-8");header("Cache-Control: no-cache");if($b->headers()){header("X-Frame-Options: deny");header("X-XSS-Protection: 0");}}function |
||
0 ignored issues
–
show
The function
page_messages() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L490-491) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
493 | View Code Duplication | page_messages($k){$Ee=preg_replace('~^[^?]*~','',$_SERVER["REQUEST_URI"]);$Hc=$_SESSION["messages"][$Ee];if($Hc){echo"<div class='message'>".implode("</div>\n<div class='message'>",$Hc)."</div>\n";unset($_SESSION["messages"][$Ee]);}if($k)echo"<div class='error'>$k</div>\n";}function |
|
0 ignored issues
–
show
The function
page_footer() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L491-503) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() This function seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
494 | page_footer($Ic=""){global$b,$qe;echo'</div> |
||
495 | |||
496 | ';if($Ic!="auth"){echo'<form action="" method="post"> |
||
497 | <p class="logout"> |
||
498 | <input type="submit" name="logout" value="Logout" id="logout"> |
||
499 | <input type="hidden" name="token" value="',$qe,'"> |
||
500 | </p> |
||
501 | </form> |
||
502 | ';}echo'<div id="menu"> |
||
503 | ';$b->navigation($Ic);echo'</div> |
||
504 | <script type="text/javascript">setupSubmitHighlight(document);</script> |
||
505 | ';}function |
||
0 ignored issues
–
show
The function
int32() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L503-504) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
506 | int32($C){while($C>=2147483648)$C-=4294967296;while($C<=-2147483649)$C+=4294967296;return(int)$C;}function |
||
0 ignored issues
–
show
The function
long2str() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L504-507) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
507 | long2str($U,$Ke){$Ed='';foreach($U |
||
508 | as$V)$Ed.=pack('V',$V);if($Ke)return |
||
509 | substr($Ed,0,end($U));return$Ed;}function |
||
0 ignored issues
–
show
The function
str2long() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L507-508) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
510 | str2long($Ed,$Ke){$U=array_values(unpack('V*',str_pad($Ed,4*ceil(strlen($Ed)/4),"\0")));if($Ke)$U[]=strlen($Ed);return$U;}function |
||
0 ignored issues
–
show
The function
xxtea_mx() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L508-510) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
511 | xxtea_mx($Z,$Oe,$ae,$w){return |
||
512 | int32((($Z>>5&0x7FFFFFF)^$Oe<<2)+(($Oe>>3&0x1FFFFFFF)^$Z<<4))^int32(($ae^$Oe)+($w^$Z));}function |
||
0 ignored issues
–
show
The function
encrypt_string() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L510-512) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
513 | encrypt_string($Vd,$x){if($Vd=="")return"";$x=array_values(unpack("V*",pack("H*",md5($x))));$U=str2long($Vd,true);$C=count($U)-1;$Z=$U[$C];$Oe=$U[0];$rd=floor(6+52/($C+1));$ae=0;while($rd-->0){$ae=int32($ae+0x9E3779B9);$lb=$ae>>2&3;for($cd=0;$cd<$C;$cd++){$Oe=$U[$cd+1];$Kc=xxtea_mx($Z,$Oe,$ae,$x[$cd&3^$lb]);$Z=int32($U[$cd]+$Kc);$U[$cd]=$Z;}$Oe=$U[0];$Kc=xxtea_mx($Z,$Oe,$ae,$x[$cd&3^$lb]);$Z=int32($U[$C]+$Kc);$U[$C]=$Z;}return |
||
0 ignored issues
–
show
$Oe is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
514 | long2str($U,false);}function |
||
0 ignored issues
–
show
The function
decrypt_string() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L512-515) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
515 | decrypt_string($Vd,$x){if($Vd=="")return"";if(!$x)return |
||
516 | false;$x=array_values(unpack("V*",pack("H*",md5($x))));$U=str2long($Vd,false);$C=count($U)-1;$Z=$U[$C];$Oe=$U[0];$rd=floor(6+52/($C+1));$ae=int32($rd*0x9E3779B9);while($ae){$lb=$ae>>2&3;for($cd=$C;$cd>0;$cd--){$Z=$U[$cd-1];$Kc=xxtea_mx($Z,$Oe,$ae,$x[$cd&3^$lb]);$Oe=int32($U[$cd]-$Kc);$U[$cd]=$Oe;}$Z=$U[$C];$Kc=xxtea_mx($Z,$Oe,$ae,$x[$cd&3^$lb]);$Oe=int32($U[0]-$Kc);$U[0]=$Oe;$ae=int32($ae-0x9E3779B9);}return |
||
0 ignored issues
–
show
$Z is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
517 | long2str($U,true);}$f='';$Zb=$_SESSION["token"];if(!$Zb)$_SESSION["token"]=rand(1,1e6);$qe=get_token();$gd=array();if($_COOKIE["adminer_permanent"]){foreach(explode(" ",$_COOKIE["adminer_permanent"])as$V){list($x)=explode(":",$V);$gd[$x]=$V;}}function |
||
0 ignored issues
–
show
The function
add_invalid_login() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L515-517) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
518 | add_invalid_login(){global$b;$Fb=get_temp_dir()."/adminer.invalid";$Rb=@fopen($Fb,"r+");if(!$Rb){$Rb=@fopen($Fb,"w");if(!$Rb)return;}flock($Rb,LOCK_EX);$oc=unserialize(stream_get_contents($Rb));$je=time();if($oc){foreach($oc |
||
519 | View Code Duplication | as$pc=>$V){if($V[0]<$je)unset($oc[$pc]);}}$nc=&$oc[$b->bruteForceKey()];if(!$nc)$nc=array($je+30*60,0);$nc[1]++;$Ld=serialize($oc);rewind($Rb);fwrite($Rb,$Ld);ftruncate($Rb,strlen($Ld));flock($Rb,LOCK_UN);fclose($Rb);}$ra=$_POST["auth"];if($ra){$oc=unserialize(@file_get_contents(get_temp_dir()."/adminer.invalid"));$nc=$oc[$b->bruteForceKey()];$Mc=($nc[1]>30?$nc[0]-time():0);if($Mc>0)auth_error(lang(array('Too many unsuccessful logins, try again in %d minute.','Too many unsuccessful logins, try again in %d minutes.'),ceil($Mc/60)));session_regenerate_id();$X=$ra["driver"];$O=$ra["server"];$T=$ra["username"];$G=(string)$ra["password"];$h=$ra["db"];set_password($X,$O,$T,$G);$_SESSION["db"][$X][$O][$T][$h]=true;if($ra["permanent"]){$x=base64_encode($X)."-".base64_encode($O)."-".base64_encode($T)."-".base64_encode($h);$od=$b->permanentLogin(true);$gd[$x]="$x:".base64_encode($od?encrypt_string($G,$od):"");cookie("adminer_permanent",implode(" ",$gd));}if(count($_POST)==1||DRIVER!=$X||SERVER!=$O||$_GET["username"]!==$T||DB!=$h)redirect(auth_url($X,$O,$T,$h));}elseif($_POST["logout"]){if($Zb&&!verify_token()){page_header('Logout','Invalid CSRF token. Send the form again.');page_footer("db");exit;}else{foreach(array("pwds","db","dbs","queries")as$x)set_session($x,null);unset_permanent();redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~','',ME),0,-1),'Logout successful.');}}elseif($gd&&!$_SESSION["pwds"]){session_regenerate_id();$od=$b->permanentLogin();foreach($gd |
|
0 ignored issues
–
show
The expression
$gd of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
520 | as$x=>$V){list(,$Ha)=explode(":",$V);list($X,$O,$T,$h)=array_map('base64_decode',explode("-",$x));set_password($X,$O,$T,decrypt_string(base64_decode($Ha),$od));$_SESSION["db"][$X][$O][$T][$h]=true;}}function |
||
0 ignored issues
–
show
The function
unset_permanent() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L518-520) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
521 | View Code Duplication | unset_permanent(){global$gd;foreach($gd |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
522 | as$x=>$V){list($X,$O,$T,$h)=array_map('base64_decode',explode("-",$x));if($X==DRIVER&&$O==SERVER&&$T==$_GET["username"]&&$h==DB)unset($gd[$x]);}cookie("adminer_permanent",implode(" ",$gd));}function |
||
0 ignored issues
–
show
The function
auth_error() has been defined more than once; this definition is ignored, only the first definition in include/adminer.php (L520-521) is considered.
This check looks for functions that have already been defined in other files. Some Codebases, like WordPress, make a practice of defining functions multiple times. This
may lead to problems with the detection of function parameters and types. If you really
need to do this, you can mark the duplicate definition with the /**
* @ignore
*/
function getUser() {
}
function getUser($id, $realm) {
}
See also the PhpDoc documentation for @ignore. ![]() |
|||
523 | View Code Duplication | auth_error($k){global$b,$Zb;$k=h($k);$Od=session_name();if(isset($_GET["username"])){header("HTTP/1.1 403 Forbidden");if(($_COOKIE[$Od]||$_GET[$Od])&&!$Zb)$k='Session expired, please login again.';else{add_invalid_login();$G=get_password();if($G!==null){if($G===false)$k.='<br>'.sprintf('Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.','<code>permanentLogin()</code>');set_password(DRIVER,SERVER,$_GET["username"],null);}unset_permanent();}}if(!$_COOKIE[$Od]&&$_GET[$Od]&&ini_bool("session.use_only_cookies"))$k='Session support must be enabled.';$ed=session_get_cookie_params();cookie("adminer_key",($_COOKIE["adminer_key"]?$_COOKIE["adminer_key"]:rand_string()),$ed["lifetime"]);page_header('Login',$k,null);echo"<form action='' method='post'>\n";$b->loginForm();echo"<div>";hidden_fields($_POST,array("auth"));echo"</div>\n","</form>\n";page_footer("auth");exit;}if(isset($_GET["username"])){if(!class_exists("Min_DB")){unset($_SESSION["pwds"][DRIVER]);unset_permanent();page_header('No extension',sprintf('None of the supported PHP extensions (%s) are available.',implode(", ",$kd)),false);page_footer("auth");exit;}$f=connect();}$i=new |
|
0 ignored issues
–
show
null is of type null , but the function expects a array .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() false is of type boolean , but the function expects a array .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
524 | View Code Duplication | Min_Driver($f);if(!is_object($f)||($_c=$b->login($_GET["username"],get_password()))!==true)auth_error((is_string($f)?$f:(is_string($_c)?$_c:'Invalid credentials.')));if($ra&&$_POST["token"])$_POST["token"]=$qe;$k='';if($_POST){if(!verify_token()){$kc="max_input_vars";$Fc=ini_get($kc);if(extension_loaded("suhosin")){foreach(array("suhosin.request.max_vars","suhosin.post.max_vars")as$x){$V=ini_get($x);if($V&&(!$Fc||$V<$Fc)){$kc=$x;$Fc=$V;}}}$k=(!$_POST["token"]&&$Fc?sprintf('Maximum number of allowed fields exceeded. Please increase %s.',"'$kc'"):'Invalid CSRF token. Send the form again.'.' '.'If you did not send this request from Adminer then close this page.');}}elseif($_SERVER["REQUEST_METHOD"]=="POST"){$k=sprintf('Too big POST data. Reduce the data or increase the %s configuration directive.',"'post_max_size'");if(isset($_GET["sql"]))$k.=' '.'You can upload a big SQL file via FTP and import it from server.';}if(!ini_bool("session.use_cookies")||@ini_set("session.use_cookies",false)!==false)session_write_close();function |
|
0 ignored issues
–
show
The expression
$_POST of type array<string,string> is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
525 | email_header($ac){return"=?UTF-8?B?".base64_encode($ac)."?=";}function |
||
526 | send_mail($pb,$Yd,$B,$Sb="",$Gb=array()){$j=(DIRECTORY_SEPARATOR=="/"?"\n":"\r\n");$B=str_replace("\n",$j,wordwrap(str_replace("\r","","$B\n")));$Ba=uniqid("boundary");$qa="";foreach((array)$Gb["error"]as$x=>$V){if(!$V)$qa.="--$Ba$j"."Content-Type: ".str_replace("\n","",$Gb["type"][$x]).$j."Content-Disposition: attachment; filename=\"".preg_replace('~["\\n]~','',$Gb["name"][$x])."\"$j"."Content-Transfer-Encoding: base64$j$j".chunk_split(base64_encode(file_get_contents($Gb["tmp_name"][$x])),76,$j).$j;}$ya="";$bc="Content-Type: text/plain; charset=utf-8$j"."Content-Transfer-Encoding: 8bit";if($qa){$qa.="--$Ba--$j";$ya="--$Ba$j$bc$j$j";$bc="Content-Type: multipart/mixed; boundary=\"$Ba\"";}$bc.=$j."MIME-Version: 1.0$j"."X-Mailer: Adminer Editor".($Sb?$j."From: ".str_replace("\n","",$Sb):"");return |
||
527 | mail($pb,email_header($Yd),$ya.$B.$qa,$bc);}function |
||
528 | like_bool($l){return |
||
529 | preg_match("~bool|(tinyint|bit)\\(1\\)~",$l["full_type"]);}$f->select_db($b->database());$Rc="RESTRICT|NO ACTION|CASCADE|SET NULL|SET DEFAULT";$jb[DRIVER]='Login';if(isset($_GET["select"])&&($_POST["edit"]||$_POST["clone"])&&!$_POST["save"])$_GET["edit"]=$_GET["select"];if(isset($_GET["download"])){$a=$_GET["download"];$m=fields($a);header("Content-Type: application/octet-stream");header("Content-Disposition: attachment; filename=".friendly_url("$a-".implode("_",$_GET["where"])).".".friendly_url($_GET["field"]));$N=array(idf_escape($_GET["field"]));$J=$i->select($a,$N,array(where($_GET,$m)),$N);$L=($J?$J->fetch_row():array());echo$L[0];exit;}elseif(isset($_GET["edit"])){$a=$_GET["edit"];$m=fields($a);$Y=(isset($_GET["select"])?(count($_POST["check"])==1?where_check($_POST["check"][0],$m):""):where($_GET,$m));$De=(isset($_GET["select"])?$_POST["edit"]:$Y);foreach($m |
||
530 | as$D=>$l){if(!isset($l["privileges"][$De?"update":"insert"])||$b->fieldName($l)=="")unset($m[$D]);}if($_POST&&!$k&&!isset($_GET["select"])){$_=$_POST["referer"];if($_POST["insert"])$_=($De?null:$_SERVER["REQUEST_URI"]);elseif(!preg_match('~^.+&select=.+$~',$_))$_=ME."select=".urlencode($a);$t=indexes($a);$ze=unique_array($_GET["where"],$t);$ud="\nWHERE $Y";if(isset($_POST["delete"]))queries_redirect($_,'Item has been deleted.',$i->delete($a,$ud,!$ze));else{$P=array();foreach($m |
||
0 ignored issues
–
show
!$ze is of type boolean , but the function expects a integer .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The expression
$_POST of type array<string,string> is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
531 | as$D=>$l){$V=process_input($l);if($V!==false&&$V!==null)$P[idf_escape($D)]=$V;}if($De){if(!$P)redirect($_);queries_redirect($_,'Item has been updated.',$i->update($a,$P,$ud,!$ze));if(is_ajax()){page_headers();page_messages($k);exit;}}else{$J=$i->insert($a,$P);$vc=($J?last_id():0);queries_redirect($_,sprintf('Item%s has been inserted.',($vc?" $vc":"")),$J);}}}$L=null;if($_POST["save"])$L=(array)$_POST["fields"];elseif($Y){$N=array();foreach($m |
||
0 ignored issues
–
show
!$ze is of type boolean , but the function expects a integer .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The expression
$P of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
532 | as$D=>$l){if(isset($l["privileges"]["select"])){$oa=convert_field($l);if($_POST["clone"]&&$l["auto_increment"])$oa="''";if($v=="sql"&&preg_match("~enum|set~",$l["type"]))$oa="1*".idf_escape($D);$N[]=($oa?"$oa AS ":"").idf_escape($D);}}$L=array();if(!support("table"))$N=array("*");if($N){$J=$i->select($a,$N,array($Y),$N,array(),(isset($_GET["select"])?2:1));$L=$J->fetch_assoc();if(!$L)$L=false;if(isset($_GET["select"])&&(!$L||$J->fetch_assoc()))$L=null;}}if(!support("table")&&!$m){if(!$Y){$J=$i->select($a,array("*"),$Y,array("*"));$L=($J?$J->fetch_assoc():false);if(!$L)$L=array($i->primary=>"");}if($L){foreach($L |
||
0 ignored issues
–
show
The property
primary does not seem to exist in Min_Driver .
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name. If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading. ![]() The expression
$N of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$m of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
533 | View Code Duplication | as$x=>$V){if(!$Y)$L[$x]=null;$m[$x]=array("field"=>$x,"null"=>($x!=$i->primary),"auto_increment"=>($x==$i->primary));}}}edit_form($a,$m,$L,$De);}elseif(isset($_GET["select"])){$a=$_GET["select"];$S=table_status1($a);$t=indexes($a);$m=fields($a);$Ob=column_foreign_keys($a);$Qc="";if($S["Oid"]){$Qc=($v=="sqlite"?"rowid":"oid");$t[]=array("type"=>"PRIMARY","columns"=>array($Qc));}parse_str($_COOKIE["adminer_import"],$ia);$Dd=array();$e=array();$he=null;foreach($m |
|
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||
534 | as$x=>$l){$D=$b->fieldName($l);if(isset($l["privileges"]["select"])&&$D!=""){$e[$x]=html_entity_decode(strip_tags($D),ENT_QUOTES);if(is_shortable($l))$he=$b->selectLengthProcess();}$Dd+=$l["privileges"];}list($N,$p)=$b->selectColumnsProcess($e,$t);$u=count($p)<count($N);$Y=$b->selectSearchProcess($m,$t);$E=$b->selectOrderProcess($m,$t);$y=$b->selectLimitProcess();$Sb=($N?implode(", ",$N):"*".($Qc?", $Qc":"")).convert_fields($e,$m,$N)."\nFROM ".table($a);$Ub=($p&&$u?"\nGROUP BY ".implode(", ",$p):"").($E?"\nORDER BY ".implode(", ",$E):"");if($_GET["val"]&&is_ajax()){header("Content-Type: text/plain; charset=utf-8");foreach($_GET["val"]as$_e=>$L){$oa=convert_field($m[key($L)]);$N=array($oa?$oa:idf_escape(key($L)));$Y[]=where_check($_e,$m);$K=$i->select($a,$N,$Y,$N);if($K)echo |
||
0 ignored issues
–
show
The expression
$p of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
535 | reset($K->fetch_row());}exit;}if($_POST&&!$k){$Me=$Y;if(!$_POST["all"]&&is_array($_POST["check"])){$Ga=array();foreach($_POST["check"]as$Ea)$Ga[]=where_check($Ea,$m);$Me[]="((".implode(") OR (",$Ga)."))";}$Me=($Me?"\nWHERE ".implode(" AND ",$Me):"");$md=$Be=null;foreach($t |
||
0 ignored issues
–
show
The expression
$_POST of type array<string,string> is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
536 | as$s){if($s["type"]=="PRIMARY"){$md=array_flip($s["columns"]);$Be=($N?$md:array());break;}}foreach((array)$Be |
||
537 | as$x=>$V){if(in_array(idf_escape($x),$N))unset($Be[$x]);}if($_POST["export"]){cookie("adminer_import","output=".urlencode($_POST["output"])."&format=".urlencode($_POST["format"]));dump_headers($a);$b->dumpTable($a,"");if(!is_array($_POST["check"])||$Be===array())$I="SELECT $Sb$Me$Ub";else{$ye=array();foreach($_POST["check"]as$V)$ye[]="(SELECT".limit($Sb,"\nWHERE ".($Y?implode(" AND ",$Y)." AND ":"").where_check($V,$m).$Ub,1).")";$I=implode(" UNION ALL ",$ye);}$b->dumpData($a,"table",$I);exit;}if(!$b->selectEmailProcess($Y,$Ob)){if($_POST["save"]||$_POST["delete"]){$J=true;$ja=0;$P=array();if(!$_POST["delete"]){foreach($e |
||
538 | as$D=>$V){$V=process_input($m[$D]);if($V!==null&&($_POST["clone"]||$V!==false))$P[idf_escape($D)]=($V!==false?$V:idf_escape($D));}}if($_POST["delete"]||$P){if($_POST["clone"])$I="INTO ".table($a)." (".implode(", ",array_keys($P)).")\nSELECT ".implode(", ",$P)."\nFROM ".table($a);if($_POST["all"]||($Be===array()&&is_array($_POST["check"]))||$u){$J=($_POST["delete"]?$i->delete($a,$Me):($_POST["clone"]?queries("INSERT $I$Me"):$i->update($a,$P,$Me)));$ja=$f->affected_rows;}else{foreach((array)$_POST["check"]as$V){$Le="\nWHERE ".($Y?implode(" AND ",$Y)." AND ":"").where_check($V,$m);$J=($_POST["delete"]?$i->delete($a,$Le,1):($_POST["clone"]?queries("INSERT".limit1($I,$Le)):$i->update($a,$P,$Le)));if(!$J)break;$ja+=$f->affected_rows;}}}$B=lang(array('%d item has been affected.','%d items have been affected.'),$ja);if($_POST["clone"]&&$J&&$ja==1){$vc=last_id();if($vc)$B=sprintf('Item%s has been inserted.'," $vc");}queries_redirect(remove_from_uri($_POST["all"]&&$_POST["delete"]?"page":""),$B,$J);if(!$_POST["delete"]){edit_form($a,$m,(array)$_POST["fields"],!$_POST["clone"]);page_footer();exit;}}elseif(!$_POST["import"]){if(!$_POST["val"])$k='Ctrl+click on a value to modify it.';else{$J=true;$ja=0;foreach($_POST["val"]as$_e=>$L){$P=array();foreach($L |
||
0 ignored issues
–
show
The expression
$P of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
539 | as$x=>$V){$x=bracket_escape($x,1);$P[idf_escape($x)]=(preg_match('~char|text~',$m[$x]["type"])||$V!=""?$b->processInput($m[$x],$V):"NULL");}$J=$i->update($a,$P," WHERE ".($Y?implode(" AND ",$Y)." AND ":"").where_check($_e,$m),!($u||$Be===array())," ");if(!$J)break;$ja+=$f->affected_rows;}queries_redirect(remove_from_uri(),lang(array('%d item has been affected.','%d items have been affected.'),$ja),$J);}}elseif(!is_string($Eb=get_file("csv_file",true)))$k=upload_error($Eb);elseif(!preg_match('~~u',$Eb))$k='File must be in UTF-8 encoding.';else{cookie("adminer_import","output=".urlencode($ia["output"])."&format=".urlencode($_POST["separator"]));$J=true;$Oa=array_keys($m);preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~',$Eb,$Bc);$ja=count($Bc[0]);$i->begin();$Kd=($_POST["separator"]=="csv"?",":($_POST["separator"]=="tsv"?"\t":";"));$M=array();foreach($Bc[0]as$x=>$V){preg_match_all("~((?>\"[^\"]*\")+|[^$Kd]*)$Kd~",$V.$Kd,$Cc);if(!$x&&!array_diff($Cc[1],$Oa)){$Oa=$Cc[1];$ja--;}else{$P=array();foreach($Cc[1]as$q=>$La)$P[idf_escape($Oa[$q])]=($La==""&&$m[$Oa[$q]]["null"]?"NULL":q(str_replace('""','"',preg_replace('~^"|"$~','',$La))));$M[]=$P;}}$J=(!$M||$i->insertUpdate($a,$M,$md));if($J)$i->commit();queries_redirect(remove_from_uri("page"),lang(array('%d row has been imported.','%d rows have been imported.'),$ja),$J);$i->rollback();}}}$de=$b->tableName($S);if(is_ajax()){page_headers();ob_start();}else |
||
0 ignored issues
–
show
1 is of type integer , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() !($u || $Be === array()) is of type boolean , but the function expects a integer .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The expression
$M of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
540 | page_header('Select'.": $de",$k);$P=null;if(isset($Dd["insert"])||!support("table")){$P="";foreach((array)$_GET["where"]as$V){if(count($Ob[$V["col"]])==1&&($V["op"]=="="||(!$V["op"]&&!preg_match('~[_%]~',$V["val"]))))$P.="&set".urlencode("[".bracket_escape($V["col"])."]")."=".urlencode($V["val"]);}}$b->selectLinks($S,$P);if(!$e&&support("table"))echo"<p class='error'>".'Unable to select the table'.($m?".":": ".error())."\n";else{echo"<form action='' id='form'>\n","<div style='display: none;'>";hidden_fields_get();echo(DB!=""?'<input type="hidden" name="db" value="'.h(DB).'">'.(isset($_GET["ns"])?'<input type="hidden" name="ns" value="'.h($_GET["ns"]).'">':""):"");echo'<input type="hidden" name="select" value="'.h($a).'">',"</div>\n";$b->selectColumnsPrint($N,$e);$b->selectSearchPrint($Y,$e,$t);$b->selectOrderPrint($E,$e,$t);$b->selectLimitPrint($y);$b->selectLengthPrint($he);$b->selectActionPrint($t);echo"</form>\n";$F=$_GET["page"];if($F=="last"){$n=$f->result(count_rows($a,$Y,$u,$p));$F=floor(max(0,$n-1)/$y);}$Hd=$N;if(!$Hd){$Hd[]="*";if($Qc)$Hd[]=$Qc;}$Ua=convert_fields($e,$m,$N);if($Ua)$Hd[]=substr($Ua,2);$J=$i->select($a,$Hd,$Y,$p,$E,$y,$F,true);if(!$J)echo"<p class='error'>".error()."\n";else{if($v=="mssql"&&$F)$J->seek($y*$F);$rb=array();echo"<form action='' method='post' enctype='multipart/form-data'>\n";$M=array();while($L=$J->fetch_assoc()){if($F&&$v=="oracle")unset($L["RNUM"]);$M[]=$L;}if($_GET["page"]!="last"&&+$y&&$p&&$u&&$v=="sql")$n=$f->result(" SELECT FOUND_ROWS()");if(!$M)echo"<p class='message'>".'No rows.'."\n";else{$xa=$b->backwardKeys($a,$de);echo"<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n","<thead><tr>".(!$p&&$N?"":"<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);'> <a href='".h($_GET["modify"]?remove_from_uri("modify"):$_SERVER["REQUEST_URI"]."&modify=1")."'>".'Modify'."</a>");$Lc=array();$Tb=array();reset($N);$wd=1;foreach($M[0]as$x=>$V){if($x!=$Qc){$V=$_GET["columns"][key($N)];$l=$m[$N?($V?$V["col"]:current($N)):$x];$D=($l?$b->fieldName($l,$wd):($V["fun"]?"*":$x));if($D!=""){$wd++;$Lc[$x]=$D;$d=idf_escape($x);$ec=remove_from_uri('(order|desc)[^=]*|page').'&order%5B0%5D='.urlencode($x);$db="&desc%5B0%5D=1";echo'<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">','<a href="'.h($ec.($E[0]==$d||$E[0]==$x||(!$E&&$u&&$p[0]==$d)?$db:'')).'">';echo |
||
0 ignored issues
–
show
The expression
$e of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$Hd of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$p of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$M of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$p of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$N of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$E of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
541 | apply_sql_function($V["fun"],$D)."</a>";echo"<span class='column hidden'>","<a href='".h($ec.$db)."' title='".'descending'."' class='text'> ↓</a>";if(!$V["fun"])echo'<a href="#fieldset-search" onclick="selectSearch(\''.h(js_escape($x)).'\'); return false;" title="'.'Search'.'" class="text jsonly"> =</a>';echo"</span>";}$Tb[$x]=$V["fun"];next($N);}}$yc=array();if($_GET["modify"]){foreach($M |
||
542 | as$L){foreach($L |
||
543 | as$x=>$V)$yc[$x]=max($yc[$x],min(40,strlen(utf8_decode($V))));}}echo($xa?"<th>".'Relations':"")."</thead>\n";if(is_ajax()){if($y%2==1&&$F%2==1)odd();ob_end_clean();}foreach($b->rowDescriptions($M,$Ob)as$C=>$L){$ze=unique_array($M[$C],$t);if(!$ze){$ze=array();foreach($M[$C]as$x=>$V){if(!preg_match('~^(COUNT\\((\\*|(DISTINCT )?`(?:[^`]|``)+`)\\)|(AVG|GROUP_CONCAT|MAX|MIN|SUM)\\(`(?:[^`]|``)+`\\))$~',$x))$ze[$x]=$V;}}$_e="";foreach($ze |
||
0 ignored issues
–
show
|
|||
544 | as$x=>$V){if(($v=="sql"||$v=="pgsql")&&strlen($V)>64){$x=(strpos($x,'(')?$x:idf_escape($x));$x="MD5(".($v=='sql'&&preg_match("~^utf8_~",$m[$x]["collation"])?$x:"CONVERT($x USING ".charset($f).")").")";$V=md5($V);}$_e.="&".($V!==null?urlencode("where[".bracket_escape($x)."]")."=".urlencode($V):"null%5B%5D=".urlencode($x));}echo"<tr".odd().">".(!$p&&$N?"":"<td>".checkbox("check[]",substr($_e,1),in_array(substr($_e,1),(array)$_POST["check"]),"","this.form['all'].checked = false; formUncheck('all-page');").($u||information_schema(DB)?"":" <a href='".h(ME."edit=".urlencode($a).$_e)."'>".'edit'."</a>"));foreach($L |
||
0 ignored issues
–
show
The expression
$p of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$N of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
545 | as$x=>$V){if(isset($Lc[$x])){$l=$m[$x];if($V!=""&&(!isset($rb[$x])||$rb[$x]!=""))$rb[$x]=(is_mail($V)?$Lc[$x]:"");$z="";if(preg_match('~blob|bytea|raw|file~',$l["type"])&&$V!="")$z=ME.'download='.urlencode($a).'&field='.urlencode($x).$_e;if(!$z&&$V!==null){foreach((array)$Ob[$x]as$Nb){if(count($Ob[$x])==1||end($Nb["source"])==$x){$z="";foreach($Nb["source"]as$q=>$Rd)$z.=where_link($q,$Nb["target"][$q],$M[$C][$Rd]);$z=($Nb["db"]!=""?preg_replace('~([?&]db=)[^&]+~','\\1'.urlencode($Nb["db"]),ME):ME).'select='.urlencode($Nb["table"]).$z;if(count($Nb["source"])==1)break;}}}if($x=="COUNT(*)"){$z=ME."select=".urlencode($a);$q=0;foreach((array)$_GET["where"]as$U){if(!array_key_exists($U["col"],$ze))$z.=where_link($q++,$U["col"],$U["val"],$U["op"]);}foreach($ze |
||
546 | as$w=>$U)$z.=where_link($q++,$w,$U);}$V=select_value($V,$z,$l,$he);$r=h("val[$_e][".bracket_escape($x)."]");$W=$_POST["val"][$_e][bracket_escape($x)];$nb=!is_array($L[$x])&&is_utf8($V)&&$M[$C][$x]==$L[$x]&&!$Tb[$x];$ge=preg_match('~text|lob~',$l["type"]);if(($_GET["modify"]&&$nb)||$W!==null){$Wb=h($W!==null?$W:$L[$x]);echo"<td>".($ge?"<textarea name='$r' cols='30' rows='".(substr_count($L[$x],"\n")+1)."'>$Wb</textarea>":"<input name='$r' value='$Wb' size='$yc[$x]'>");}else{$Ac=strpos($V,"<i>...</i>");echo"<td id='$r' onclick=\"selectClick(this, event, ".($Ac?2:($ge?1:0)).($nb?"":", '".h('Use edit link to modify this value.')."'").");\">$V";}}}if($xa)echo"<td>";$b->backwardKeysPrint($xa,$M[$C]);echo"</tr>\n";}if(is_ajax())exit;echo"</table>\n";}if(($M||$F)&&!is_ajax()){$yb=true;if($_GET["page"]!="last"){if(!+$y)$n=count($M);elseif($v!="sql"||!$u){$n=($u?false:found_rows($S,$Y));if($n<max(1e4,2*($F+1)*$y))$n=reset(slow_query(count_rows($a,$Y,$u,$p)));else$yb=false;}}if(+$y&&($n===false||$n>$y||$F)){echo"<p class='pages'>";$Dc=($n===false?$F+(count($M)>=$y?2:1):floor(($n-1)/$y));if($v!="simpledb"){echo'<a href="'.h(remove_from_uri("page"))."\" onclick=\"pageClick(this.href, +prompt('".'Page'."', '".($F+1)."'), event); return false;\">".'Page'."</a>:",pagination(0,$F).($F>5?" ...":"");for($q=max(1,$F-4);$q<min($Dc,$F+5);$q++)echo |
||
0 ignored issues
–
show
The expression
$xa of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$M of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
|||
547 | pagination($q,$F);if($Dc>0){echo($F+5<$Dc?" ...":""),($yb&&$n!==false?pagination($Dc,$F):" <a href='".h(remove_from_uri("page")."&page=last")."' title='~$Dc'>".'last'."</a>");}echo(($n===false?count($M)+1:$n-$F*$y)>$y?' <a href="'.h(remove_from_uri("page")."&page=".($F+1)).'" onclick="return !selectLoadMore(this, '.(+$y).', \''.'Loading'.'...\');" class="loadmore">'.'Load more data'.'</a>':'');}else{echo'Page'.":",pagination(0,$F).($F>1?" ...":""),($F?pagination($F,$F):""),($Dc>$F?pagination($F+1,$F).($Dc>$F+1?" ...":""):"");}}echo"<p class='count'>\n",($n!==false?"(".($yb?"":"~ ").lang(array('%d row','%d rows'),$n).") ":"");$hb=($yb?"":"~ ").$n;echo |
||
548 | checkbox("all",1,0,'whole result',"var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$hb' : checked); selectCount('selected2', this.checked || !checked ? '$hb' : checked);")."\n";if($b->selectCommandPrint()){echo'<fieldset',($_GET["modify"]?'':' class="jsonly"'),'><legend>Modify</legend><div> |
||
549 | <input type="submit" value="Save"',($_GET["modify"]?'':' title="'.'Ctrl+click on a value to modify it.'.'"'),'> |
||
550 | </div></fieldset> |
||
551 | <fieldset><legend>Selected <span id="selected"></span></legend><div> |
||
552 | <input type="submit" name="edit" value="Edit"> |
||
553 | <input type="submit" name="clone" value="Clone"> |
||
554 | <input type="submit" name="delete" value="Delete"',confirm(),'> |
||
555 | </div></fieldset> |
||
556 | ';}$Pb=$b->dumpFormat();foreach((array)$_GET["columns"]as$d){if($d["fun"]){unset($Pb['sql']);break;}}if($Pb){print_fieldset("export",'Export'." <span id='selected2'></span>");$bd=$b->dumpOutput();echo($bd?html_select("output",$bd,$ia["output"])." ":""),html_select("format",$Pb,$ia["format"])," <input type='submit' name='export' value='".'Export'."'>\n","</div></fieldset>\n";}echo(!$p&&$N?"":"<script type='text/javascript'>tableCheck();</script>\n");}if($b->selectImportPrint()){print_fieldset("import",'Import',!$M);echo"<input type='file' name='csv_file'> ",html_select("separator",array("csv"=>"CSV,","csv;"=>"CSV;","tsv"=>"TSV"),$ia["format"],1);echo" <input type='submit' name='import' value='".'Import'."'>","</div></fieldset>\n";}$b->selectEmailPrint(array_filter($rb,'strlen'),$e);echo"<p><input type='hidden' name='token' value='$qe'></p>\n","</form>\n";}}if(is_ajax()){ob_end_clean();exit;}}elseif(isset($_GET["script"])){if($_GET["script"]=="kill")$f->query("KILL ".number($_POST["kill"]));elseif(list($R,$r,$D)=$b->_foreignColumn(column_foreign_keys($_GET["source"]),$_GET["field"])){$y=11;$J=$f->query("SELECT $r, $D FROM ".table($R)." WHERE ".(preg_match('~^[0-9]+$~',$_GET["value"])?"$r = $_GET[value] OR ":"")."$D LIKE ".q("$_GET[value]%")." ORDER BY 2 LIMIT $y");for($q=1;($L=$J->fetch_row())&&$q<$y;$q++)echo"<a href='".h(ME."edit=".urlencode($R)."&where".urlencode("[".bracket_escape(idf_unescape($r))."]")."=".urlencode($L[0]))."'>".h($L[1])."</a><br>\n";if($L)echo"...\n";}exit;}else{page_header('Server',"",false);if($b->homepage()){echo"<form action='' method='post'>\n","<p>".'Search data in tables'.": <input name='query' value='".h($_POST["query"])."'> <input type='submit' value='".'Search'."'>\n";if($_POST["query"]!="")search_tables();echo"<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);'>\n",'<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^tables\[/);"><th>'.'Table'.'<td>'.'Rows'."</thead>\n";foreach(table_status()as$R=>$L){$D=$b->tableName($L);if(isset($L["Engine"])&&$D!=""){echo'<tr'.odd().'><td>'.checkbox("tables[]",$R,in_array($R,(array)$_POST["tables"],true),"","formUncheck('check-all');"),"<th><a href='".h(ME).'select='.urlencode($R)."'>$D</a>";$V=format_number($L["Rows"]);echo"<td align='right'><a href='".h(ME."edit=").urlencode($R)."'>".($L["Engine"]=="InnoDB"&&$V?"~ $V":$V)."</a>";}}echo"</table>\n","<script type='text/javascript'>tableCheck();</script>\n","</form>\n";}}page_footer(); |
||
0 ignored issues
–
show
1 is of type integer , but the function expects a boolean .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The method
_foreignColumn() does not seem to exist on object<Adminer> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() false is of type boolean , but the function expects a array .
It seems like the type of the argument is not accepted by the function/method which you are calling. In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug. We suggest to add an explicit type cast like in the following example: function acceptsInteger($int) { }
$x = '123'; // string "123"
// Instead of
acceptsInteger($x);
// we recommend to use
acceptsInteger((integer) $x);
![]() The expression
$Pb of type array<string,string> is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$p of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() The expression
$N of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent. Consider making the comparison explicit by using ![]() |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.