API page: http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/varia...

On the variable_set() page, it states that the function will handle serializing data for you. On the variable_get() page, there is no mention of serialization or unserializing. For consistency, if nothing else, you need to mention it on this page. Otherwise the documentation sends mixed messages and is misleading. Aside from consistency, it would just be very useful.

Comments

jhodgdon’s picture

Version: 6.x-dev » 8.x-dev
Issue tags: +Needs backport to D6, +Novice, +Needs backport to D7

Thanks -- good idea to document.

The function does handle unserializing, which you can see in the variable_init()/variable_initialize() functions that read the variables out of the database.

This needs documenting in D8/D7/D6, starting with D8.

infiniteluke’s picture

Status: Active » Needs review
StatusFileSize
new484 bytes

Here is a try at the wording.

jhodgdon’s picture

Perhaps it should say "unserializing" instead of "serializing"?

infiniteluke’s picture

Good point.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

That seems fine to me. I'll get it committed.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Committed to both 8.x and 7.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.