# Can you spot the bug?

- Thread: https://externals.io/message/24084
- Original archive: https://news-web.php.net/php.internals/24084
- Started by Michael B Allen on 2006-06-10T21:47:09+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #24084 — Michael B Allen — 2006-06-10T21:47:09+00:00

URL: https://externals.io/message/24084#24084

Can anyone spot the bug in following code from the tutorial [1]?

  PHP_FUNCTION(hello_dump)
  {
      zval *uservar;
  
      if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", uservar) == FAILURE) {
          RETURN_NULL();
      }

Mike

[1] http://www.zend.com/php/internals/extension-writing2.php#Heading3

-- 
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/

---

## #24085 — Pierre — 2006-06-10T21:57:08+00:00

URL: https://externals.io/message/24084#24085 · In reply to: #24084

> Can anyone spot the bug in following code from the tutorial [1]?
>
>   PHP_FUNCTION(hello_dump)
>   {
>       zval *uservar;
>
>       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", uservar) == FAILURE) {

zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &uservar

(it takes a ptr ptr)

--Pierre
