diff --git a/.travis.yml b/.travis.yml
index d9092257add84d892f2034da873ec4d7e0bad017..7801ab4f9c2858eb8a7d3223e5bcfc664cfb2a98 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -56,7 +56,7 @@ matrix:
       env: BINDINGS=php CC=clang
 before_install:
   - sudo apt-get update -qq
-  - if [ "$BINDINGS" != "none" ]; then sudo add-apt-repository ppa:dns/irc -y; sudo apt-get update -qq; sudo apt-get install -qq swig=2.0.8-1irc1~12.04; swig -version; fi
+  - if [ "$BINDINGS" != "none" ]; then sudo add-apt-repository ppa:dns/irc -y; sudo apt-get update -qq; sudo apt-get install -qq swig=2.0.8-1irc1~12.04; fi
   - if [ "$BINDINGS" == "python" ]; then sudo apt-get install -qq python-dev; fi
 
 install: true
diff --git a/src/bindings/php/hammer.i b/src/bindings/php/hammer.i
index 58bfbad4c9c8a03a1c51dad401b92e1372477dfd..3835c283fa271d7740130b034a35c091de90f0b7 100644
--- a/src/bindings/php/hammer.i
+++ b/src/bindings/php/hammer.i
@@ -121,6 +121,7 @@
 
 %inline {
   void hpt_to_php(const HParsedToken *token, zval *return_value) {
+    TSRMLS_FETCH();
     if (!token) {
       RETVAL_NULL();
       return;