Skip to content

Instantly share code, notes, and snippets.

View mattleff's full-sized avatar
🌏

Matthew Leffler mattleff

🌏
  • Eureka, MT
View GitHub Profile
<?php
include( 'includes/db_connect.inc.php' );
$link_id = db_connect();
....
//All their code below can use mysql_query() as expected.
$result = mysql_query( $query );
@mattleff
mattleff / gist:1093785
Created July 19, 2011 21:36
The Cardinal Sins of SU Bug Reporting

7 Mortal Sins

  1. Multiple issues in the same ticket
  2. Insufficient vetting of ticket
  • Is duplicable is not a yes/no but a prerequisite(?)
  • What exactly do you have to do to reproduce the issue?
  1. Incorrect/non-descriptive names
  • "no creation date"
  • "Shopping cart (transaction.php) is not charging the correct amount in FF 5.0 and IE 8.0+"
  • No need to mention the browsers unless it is a unique issue with a particular browser, which you should check
<?php
class DB_unit_test_comments extends DB_unit_case_freshdb
{
function testGetNewConfig()
{
$siteinfo = new DB_siteinfo();
$siteinfo->save();
<?php
class SF_mapMethod_mock extends DateTime
{
public function __toString()
{
return $this->format('Y-m-d H:i:s');
}
}