Permalink
Commits on Mar 19, 2011
  1. Fix const pointer type error.

    Explanation:
    Const pointer had to name the class for the type, rather than the
    constructor.
    
    The error in both files was:  error: "‘HPHP::ClassInfo::ClassInfo’ names the
    constructor, not the type".
    committed Mar 19, 2011
  2. @scottmac

    MySQL 5.5 removed some dead code which includes last_used_con

    Summary:
    last_used_con was used for replication within libmysqlclient but this
    was never enabled or used. MySQL developers killed it all in 5.5.0.
    
    Use an #ifdef for now in case we're using some experimental stuff somewhere.
    
    Test Plan:
    Built against MySQL 5.5 and our external version
    
    DiffCamp Revision: 177173
    Reviewed By: hzhao
    CC: hzhao, hphp-diffs@lists
    Revert Plan:
    Ok
    scottmac committed with Nov 2, 2010
Commits on Mar 17, 2011
  1. Fix build bug with ICU 4.6 by replacing old

    CMake/FindICU.cmake with one from facebook/hiphop-php repo.
    committed Mar 17, 2011
Commits on Jul 13, 2010
  1. @ZaneA
Commits on Jul 12, 2010
  1. @ZaneA
Commits on Jun 12, 2010
  1. @ZaneA
  2. @ZaneA
  3. @ZaneA

    Added missing files..

    ZaneA committed Jun 12, 2010
  4. @ZaneA

    Initial Commit

    ZaneA committed Jun 12, 2010
Commits on Jun 9, 2010
  1. @scottmac

    Fix issues caused by NRVO & Copy Constructor Elision

    Summary:
    The C++ Named Return Value Optimization could cause issues with referenced
    variants.
    If a function returns a variant, and isnt a ref return, it should never return
    a variant with m_type KindOfVariant, but the NRVO could bypass construction of
    the temporary, and cause one to be returned, which is semantically incorrect.
    
    Similarly, Copy Constructor Elision can cause the same problem, since we assume
    that the copy constructor will consume the contagious bit.
    
    Test Plan:
    added test case:
    <?php ;
    $foo = 123;
    function &baz() {
      global $foo;
      return $foo;
    }
    function bar() {
      $baz = "baz";
      return $baz();
    }
    function buz() {
      global $foo;
      return ($foo);
    }
    $a = &bar();
    $a = 456;
    var_dump($a, $foo);
    $a = &buz();
    $a = 789;
    var_dump($a, $foo);
    
    fast_tests, slow_tests, unit tests. Visually diff www with/without the change.
    
    DiffCamp Revision: 121740
    Reviewed By: hzhao
    CC: hphp-diffs@lists, hzhao, mwilliams
    Tasks:
    #220666: Invalid operand type with objects and references
    
    Revert Plan:
    OK
    mwilliams committed with scottmac Jun 8, 2010
  2. @scottmac
  3. @scottmac

    typo noticed by hui chen

    scottmac committed Jun 9, 2010
  4. @andrewparoski @scottmac

    Various fixes and improvements to error handling logic

    Summary:
    This revision makes the following changes:
    
    1) Combined the insideUserHandler and insideRaiseError flags into a single
    flag call errorState. I also moved some of the logic from runtime_error.cpp
    to execution_context.cpp
    
    2) Fixed a bug where we were completely ignoring errors/warnings/notices
    raised inside a user error handler
    
    3) Fixed set_error_handler() to respect its second parameter ($error_types)
    
    4) Improved the varargs versions of raise_warning, raise_strict_warning, and
    raise_notice to first check if we need to call ExecutionContext::handleError
    before calling VSNPrintf
    
    5) Updated the generated files
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers: mwilliams
    
    CC:
    
    Test Plan:
    1) make fast_tests
    2) make slow_tests
    3) Run flib tests on hphpi
    
    Revert Plan:
    
    Tags: hphp
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    DiffCamp Revision: 121622
    andrewparoski committed with scottmac Jun 7, 2010
  5. @scottmac

    Missing classes in .inc files now generate an error instead of seg fault

    Summary:
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:andrewparoski
    
    CC:
    
    Test Plan: tested by hand on fractured system directory,
    regression test is impractical.
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    DiffCamp Revision: 121975
    ervan committed with scottmac Jun 9, 2010
  6. @andrewparoski @scottmac

    Fix AppendIterator to pass an empty array to ArrayIterator's constructor

    Summary:
    Constructing an AppendIterator was fataling because AppendIterator's
    constructor was calling ArrayIterator's constructor without passing
    any parameters.
    
    This revision changes AppendIterator to supply an empty array to the
    ArrayIterator constructor.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers: iproctor
    
    CC:
    
    Test Plan:
    make fast_tests
    
    Revert Plan:
    
    Tags: hphp
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    DiffCamp Revision: 121933
    andrewparoski committed with scottmac Jun 9, 2010
  7. @scottmac

    Fix collator sort bug

    Summary:
    In collator_convert_object_to_string(), we need to call
    collator_convert_str_utf8_to_utf16 after converting object to string.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    hzhao
    CC:
    hphp-diffs@lists.facebook.com
    Test Plan:
    make fast_tests
    test/test TestCodeRun TestLocale
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    DiffCamp Revision: 121937
    myang committed with scottmac Jun 9, 2010
  8. @haiping @scottmac

    fixed LDAP problem

    Summary:
    It turns out it's because Oracle's client library included a whole set of LDAP
    symbols that are not compatible with our LDAP lib. So ldap_init() calls into
    Oracle's ldap_set_option(). This took me 2 hours to figure out, and I had to
    installed a debug build of LDAP so eventually stepped into ldap_init() to find
    out what was going on :-) The fix is to make Oracle lib after LDAP linking, but
    this isn't bullet proof, so I'm asking Chris Jones to see if they can provide us
    with a .so without LDAP linkage.
    
    Test Plan:
    <?
      require_once $_SERVER['PHP_ROOT'].'/scripts/master_include.php';
    
      require_module('intern/ldap/service/ad');
      $uid = 2403811; // blair
      $ad = new ActiveDirectoryService();
      $record = $ad->getByUserId($uid);
      echo $record->getDN();
    
    DiffCamp Revision: 121816
    Reviewed By: macvicar
    CC: hphp-diffs@lists, hzhao, macvicar
    Tasks:
    #221251: hphp ldap error
    
    Revert Plan:
    OK
    haiping committed with scottmac Jun 9, 2010
  9. @scottmac

    [Fix] escalation of SmallArray should carry over the position

    Summary:
    SmallArray::escalate() needs to set m_pos in the escalated ZendArray.
    Otherwise, iteration through each() might be wrong if elements are added inside
    the loop.
    
    Also add a new testcase.
    
    Test Plan:
    TestArrayIterator
    
    DiffCamp Revision: 121729
    Reviewed By: hzhao
    CC: hphp-diffs@lists, hzhao
    Tasks:
    #221360: SmallArray doesn't carry over iteration position
    
    Revert Plan:
    OK
    qixin committed with scottmac Jun 9, 2010
  10. @scottmac

    [Fix] Only tokey for arrays

    Summary:
    There was too much toKey. toKey should not be called for offsetget etc.
    
    Test Plan:
    TestCodeRun, TestCodeRunEval, www
    
    DiffCamp Revision: 121658
    Reviewed By: qixin
    CC: hphp-diffs@lists, cpiro, qixin
    Tasks:
    #220186
    
    Revert Plan:
    OK
    iproctor committed with scottmac Jun 8, 2010
  11. @scottmac

    literal string fix

    Summary:
    This is another place that I found where I need to check KindOfStaticString.
    After this one I think I have finished checking all the places where
    KindOfStaticString should be considered.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    hzhao
    CC:
    hphp-diffs@lists.facebook.com
    Test Plan:
    make fast_tests
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    DiffCamp Revision: 121722
    myang committed with scottmac Jun 9, 2010
  12. @scottmac

    Fix bug in array_sum/product

    Summary:
    The newly added test case used to fail because of missing cases of
    LiteralString and KindOfStaticString.
    
    Test Plan:
    make fast_tests
    TestCodeRun TestArray
    
    DiffCamp Revision: 121596
    Reviewed By: qixin
    Commenters: hzhao
    CC: hphp-diffs@lists, hzhao, qixin
    Revert Plan:
    OK
    myang committed with scottmac Jun 8, 2010
  13. @scottmac

    Add some optimization to ScalarExpression::postOptimize()

    Summary:
    When an integer literal is used in a String context (as indicated by
    m_expectedType), we can preconvert value to the corresponding
    string literal because the toString() on integer conversion is
    deterministic.
    
    Task ID: #
    
    Blame Rev:
    
    Reviewers:
    mwilliams, hzhao
    CC:
    hphp-diffs@lists.facebook.com
    Test Plan:
    make fast_tests
    make www
    
    cat t.php
    <?php
    function foo($a, $b) {
      return $a . __LINE__ . $b;
    }
    function bar() {
      for ($i = 0; $i < 1000; $i++) {
        for ($j = 0; $j < 10000; $j++) {
          $a = foo("hello", "world");
        }
      }
      return $a;
    }
    var_dump(bar());
    
    1. Before the change
    time ./program
    string(11) "hello3world"
    
    real    0m3.700s
    user    0m3.652s
    sys     0m0.018s
    
    2. After the change but without literal string optimization
    time ./program
    string(11) "hello3world"
    
    real    0m2.751s
    user    0m2.698s
    sys     0m0.022s
    
    3. After the change and with literal string optimization
    time ./program
    string(11) "hello3world"
    
    real    0m1.647s
    user    0m1.596s
    sys     0m0.022s
    
    Revert Plan:
    
    Tags:
    
    - begin *PUBLIC* platform impact section -
    Bugzilla: #
    - end platform impact -
    
    DiffCamp Revision: 121499
    myang committed with scottmac Jun 7, 2010
  14. Merge commit 'd47d5433fe5ce214d462f469040486d8c9deb2b4'

    Conflicts:
    	src/third_party/libmbfl/mbfl/CMakeLists.txt
    	src/third_party/timelib/CMakeLists.txt
    Hui Chen committed Jun 9, 2010
Commits on Jun 8, 2010
  1. @scottmac
  2. @scottmac
  3. @scottmac
  4. @scottmac

    Make PDO::getAvailableDrivers() static

    Summary:
    PDO::getAvailableDrivers() is a static method and currently isn't implemented
    as that
    
    Test Plan:
    build
    
    <?php
    var_dump(PDO::getAvailableDrivers());
    
    DiffCamp Revision: 121435
    Reviewed By: hzhao
    CC: hphp-diffs@lists, hzhao
    Tasks:
    #220994: PDO::getAvailableDrivers should be a static method
    
    Revert Plan:
    OK
    scottmac committed Jun 8, 2010
  5. @haiping @scottmac

    added ForbiddenFileExtensions

    Summary:
    to exclude certain files from being executed
    
    Test Plan:
    [hzhao@dev327 src]$ GET -ds http://dev327/profile.phpt
      403 Forbidden
    
    DiffCamp Revision: 121322
    Reviewed By: myang
    CC: hphp-diffs@lists, myang
    Tasks:
    #218385: *.phpt files should return 404
    
    Revert Plan:
    OK
    haiping committed with scottmac Jun 8, 2010
  6. @haiping @scottmac

    added a script that automatically adds method injection to extension …

    …classes
    
    Summary:
    I also hijacked this into make -C system, so we don't miss them.
    
    Test Plan:
    make
    
    DiffCamp Revision: 121382
    Reviewed By: qixin
    CC: hphp-diffs@lists, qixin, mpal
    Tasks:
    
    Revert Plan:
    OK
    haiping committed with scottmac Jun 8, 2010
  7. @haiping @scottmac

    fixed html entities encode/decode's handling of &nbsp;

    Summary:
    zend_html.h/.cpp were specifically written for UTF-8 and now i'm just expanding
    it to support conversions between &nbsp and \xa0 in latin or \xc2\xa0 in utf-8.
    
    Test Plan:
    test/test TestExtString
    
    DiffCamp Revision: 121344
    Reviewed By: andrewparoski
    CC: hphp-diffs@lists, hzhao, andrewparoski
    Tasks:
    #197109: Weird symbol on careers page
    
    Revert Plan:
    OK
    haiping committed with scottmac Jun 8, 2010
  8. @haiping @scottmac

    Revert "Fix string_html_encode() and string_html_decode() to handle "…

    …&nbsp;""
    
    Summary:
    Drew, what was the original problem? I don't think this fix is correct actually
    and I need reversion of this to fix a bug caused by this diff on production.
    
    Test Plan:
    fast_tests
    
    This reverts commit b6f528e81373dd1958e8bf9e5faaaa74a118fba7.
    
    DiffCamp Revision: 121307
    Reviewed By: mwilliams
    CC: hphp-diffs@lists, hzhao, mwilliams
    Tasks:
    #220242: html_entity_decode broken when charset=UTF-8
    
    Revert Plan:
    OK
    haiping committed with scottmac Jun 8, 2010
  9. @scottmac

    Fix g++ warning

    Summary:
    On release, I saw g++ warning like
    runtime/base/type_variant.cpp:1653: error: ‘n’ may be used uninitialized in
    this function
    I think g++ is kind of weird on this case.
    
    Test Plan:
    compile www on release
    
    DiffCamp Revision: 121194
    Reviewed By: qixin
    CC: hphp-diffs@lists, qixin
    Revert Plan:
    OK
    myang committed with scottmac Jun 7, 2010
  10. test: add test_mysql_info.inc

    Hui Chen committed Jun 8, 2010